Commit 35b3d599 by 李萌萌

手纹框有错位

parent bbb63f37
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-12-21 21:40:02
* @LastEditTime: 2021-12-22 10:33:06
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
......@@ -5092,7 +5092,9 @@ export default {
"height",
originalHeight * changeHeight / self.canvasHeight + "px"
);
setTimeout(() => {
self.caclXzwkPos();
}, 200);
}
//鼠标抬起时
document.onmouseup = function () {
......@@ -5154,6 +5156,7 @@ export default {
);
} else {
self.caclDzwkPos();
return;
const canvasImage = self.imageEditor._graphics.getCanvasImage();
if (canvasImage) {
self.move_left = canvasImage.left;
......@@ -5304,6 +5307,7 @@ export default {
if (this.isSwk_flag) {
$(".blc").css('z-index', '99999')
this.startZoomAndTranslation()
this.initSwk(true);
dragable("blc_small");
dragable_blc("blc");
}
......@@ -5313,6 +5317,7 @@ export default {
* 初始化手纹框位置
*/
initSwk (isResetZwkPos) {
if(this.zwType == '指纹'){
// 设置大手纹框大小 (大图可视范围的3/5)
$(".blc").css("width", (3 / 5) * this.canvasBox_height + "px");
$(".blc").css("height", (3 / 5) * this.canvasBox_height + "px");
......@@ -5334,7 +5339,38 @@ export default {
setTimeout((() => {
this.caclXzwkPos();
}).bind(this), 100);
}else{
$(".blc").css("width", this.canvasWidth + "px");
$(".blc").css("height", this.canvasHeight + "px");
// $(".blc_small").css(
// "width",
// (this.canvasHeight * 180) / 670 / this.frame_max_bb + "px"
// );
// $(".blc_small").css(
// "height",
// (this.canvasHeight * 180) / 670 / this.frame_max_bb + "px"
// );
// 小手纹框大小
const curPicZoom = this.imageEditor.getZoom();
$(".blc_small").css(
"width",
($(".blc").width() * $(".small-drawing").width()) / this.canvasBox_height / curPicZoom + "px"
);
$(".blc_small").css(
"height",
($(".blc").height() * $(".small-drawing").height()) / this.canvasBox_height / curPicZoom + "px"
);
if (isResetZwkPos) {
//手纹框置于屏幕中央
$(".blc").css("left", $(".canvas-container").width() / 2 - $(".blc").width() / 2 + "px");
$(".blc").css("top", $(".canvas-container").height() / 2 - $(".blc").height() / 2 + "px");
}
setTimeout((() => {
this.caclXzwkPos();
}).bind(this), 100);
}
},
/**
* 计算小手纹框的位置信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment