Commit dd04c715 by 李萌萌

漂移问题处理

parent a0a56ff1
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-12-11 14:17:27
* @LastEditTime: 2021-12-11 18:43:35
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
......@@ -587,8 +587,6 @@ export default {
isHandTZD: false,
// 是否开始了拖拽
startHand: false,
originleft: null,
origintop: null,
// 角度
angle: 0,
// 是否按下了空格
......@@ -998,8 +996,6 @@ export default {
self.resetTzdDrawing()
}, 200);
//重置位置变量
self.move_left = 0;
self.move_top = 0;
self.zoomLevel = 1;
imageEditor.resetFlip().then(function (status) {
......@@ -1298,8 +1294,8 @@ export default {
originPointer = {
x: e.clientX,
y: e.clientY,
left: self.imageEditor._graphics.getCanvasImage().left,
top: self.imageEditor._graphics.getCanvasImage().top,
left:self.imageEditor._graphics.getCanvasImage().left,
top:self.imageEditor._graphics.getCanvasImage().top
};
// 开启拖拽
if (self.isHand || self.isHandSpace) {
......@@ -1501,18 +1497,17 @@ export default {
let x2 = e.clientX;
let y2 = e.clientY;
let canvasImage = imageEditor._graphics.getCanvasImage()
let originleft = self.originleft || 0;
let origintop = self.origintop || 0;
// 移动图片
const offsetx = canvasImage.getCenterPoint().x - 320;
const offsety = canvasImage.getCenterPoint().y - 320;
const leftNew =
originleft +
originPointer.left +
((x2 - x1) * self.newWidth) / self.canvasWidth / self.zoomLevel;
const topNew =
origintop +
originPointer.top +
((y2 - y1) * self.newHeight) / self.canvasHeight / self.zoomLevel;
console.log("当前移动:",x2 - x1,y2 - y1)
imageEditor._graphics.setImageProperties(
{
left: leftNew,
......@@ -1527,12 +1522,7 @@ export default {
self.tzdDrawing_top = Number(self.tzdDrawingTop_yd) + (y2 - y1);
self.tzdDrawing_left = Number(self.tzdDrawingLeft_yd) + (x2 - x1);
self.move_left =
originleft +
((x2 - x1) * self.newWidth) / self.canvasWidth / self.zoomLevel;
self.move_top =
origintop +
((y2 - y1) * self.newHeight) / self.canvasHeight / self.zoomLevel;
}
if (self.mouseEnlarge) {
// 放大
......@@ -1643,8 +1633,6 @@ export default {
.querySelector(".tzdDrawing")
.addEventListener("mouseup", function (e) {
let canvasImage = imageEditor._graphics.getCanvasImage();
self.originleft = canvasImage.left;
self.origintop = canvasImage.top;
self.tzdDrawingLeft = canvasImage.left;
self.tzdDrawingTop = canvasImage.top;
......@@ -2339,8 +2327,6 @@ export default {
self.resetTzdDrawing(true);
}, 200);
//重置位置变量
self.move_left = 0;
self.move_top = 0;
self.tzdDrawing_left = 0;
self.tzdDrawing_top = 0;
self.zoomLevel = 1;
......@@ -3653,7 +3639,7 @@ export default {
},
true
);
self.changeTzdDrawing(true);
self.changeTzdDrawing(true,true);
// LMM↑↑↑↑↑↑↑↑↑↑↑↑
};
......@@ -3811,7 +3797,6 @@ export default {
// 是否点击了历史
this.isActive_history = false;
//console.log(this.imageEditor);
this.imageEditor.stopDrawingMode();
this.isHand = !this.isHand;
if (this.isHand) {
......@@ -4055,7 +4040,7 @@ export default {
/**
* 对特征点图层进行更新
*/
changeTzdDrawing (isPingyi) {
changeTzdDrawing (isPingyi,isNotRefreshSourcePrivew) {
let canvasImage = this.imageEditor._graphics.getCanvasImage();
// 当前图像中心点
var centerP = canvasImage.getCenterPoint();
......@@ -4087,6 +4072,7 @@ export default {
);
// 缩略图
if (this.isShowSourcePrivew) {
// if (this.isShowSourcePrivew&&!isNotRefreshSourcePrivew) {
// 底图变换
$("#preview-source-img").css(
"transform",
......
/*
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-12-11 14:23:25
* @LastEditTime: 2021-12-11 18:05:11
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
......@@ -108,10 +108,10 @@ module.exports = {
"^/api": "/api"
}
},
"/login": {
"/login": {
// target: "http://www.meetfood.cn:2390/", // 登录
target: "http://zwpt.xzclub.top:9333",
// target: "http://192.168.128.124:8764/", // 登录
// target: "http://192.168.128.124:8765/", // 登录
// target: "http://192.168.128.114:8099", // 登录-马
ws: true,
changeOrigin: true,
......@@ -132,8 +132,8 @@ module.exports = {
"/security": {
//target: "http://192.168.128.106:8765", // 湖南-王
// target: "http://192.168.128.124:8764", // 湖南-张
target:"http://zwpt.xzclub.top:9333/",
target: "http://192.168.128.124:8765", // 湖南-张
// target:"http://zwpt.xzclub.top:9333/",
// target: "http://www.meetfood.cn:2390", // 湖南-王
ws: true,
......
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