Commit 79c5fd75 by liyuhang19990520

重置bug以及原图bug

parent ef14d7ea
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 11:36:10 * @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-09 10:09:16 * @LastEditTime: 2021-11-09 10:56:08
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...@@ -988,11 +988,18 @@ export default { ...@@ -988,11 +988,18 @@ export default {
self.isReset = true self.isReset = true
// 旋转角度同样恢复到0 // 旋转角度同样恢复到0
self.inputRotationRange = 0 self.inputRotationRange = 0
console.log(self.startPlace,222);
// 事件不能连续重复执行,需要缓存时间 // 事件不能连续重复执行,需要缓存时间
self.startPlace = 0;
setTimeout(() => { setTimeout(() => {
imageEditor.setAngle(0)['catch'](function () { }); console.log(11111,-self.startPlace)
imageEditor.rotate(-parseInt(self.startPlace))
imageEditor.resetZoom();
self.startPlace = 0;
}, 200); }, 200);
//重置位置变量
self.move_left = 0;
self.move_top = 0;
self.zoomLevel = 1;
imageEditor.resetFlip().then(function (status) { imageEditor.resetFlip().then(function (status) {
console.log('flipX: ', status.flipX); console.log('flipX: ', status.flipX);
console.log('flipY: ', status.flipY); console.log('flipY: ', status.flipY);
...@@ -1903,12 +1910,38 @@ export default { ...@@ -1903,12 +1910,38 @@ export default {
* @return {*} * @return {*}
*/ */
OriginalChange () { OriginalChange () {
let self = this;
self.isX = false
self.isY = false
self.isReset = true
// 旋转角度同样恢复到0
self.inputRotationRange = 0
// 事件不能连续重复执行,需要缓存时间
setTimeout(() => {
self.imageEditor.rotate(-parseInt(self.startPlace))
self.imageEditor.resetZoom();
self.startPlace = 0;
}, 200);
//重置位置变量
self.move_left = 0;
self.move_top = 0;
self.zoomLevel = 1;
self.imageEditor.resetFlip().then(function (status) {
console.log('flipX: ', status.flipX);
console.log('flipY: ', status.flipY);
console.log('angle: ', status.angle);
});
$('.tzdDrawing').css('transform', 'rotateX(0)')
$('.tzdDrawing').css('transform', 'rotateY(0)')
this.issize = true this.issize = true
this.ismoderate = false this.ismoderate = false
this.imageEditor.resetZoom() // this.imageEditor.resetZoom()
self.zoomLevel = 1 // self.zoomLevel = 1;
// 特征点图层缩放设置为1 // this.imageEditor.rotate(-parseInt(-self.startPlace));
$('.tzdDrawing').css('transform', 'scale(1)'); // self.startPlace = 0;
// // 特征点图层缩放设置为1
// $('.tzdDrawing').css('transform', 'scale(1)');
}, },
/** /**
* @description: 取消删除按钮 * @description: 取消删除按钮
...@@ -2821,25 +2854,27 @@ export default { ...@@ -2821,25 +2854,27 @@ export default {
this.isOptions = !this.isOptions this.isOptions = !this.isOptions
this.isActive = !this.isActive this.isActive = !this.isActive
if (this.isActive) { if (this.isActive) {
//重置图像大小,旋转方向的方法
this.OriginalChange();
$('.icon_size').css('background', '#055FE7') $('.icon_size').css('background', '#055FE7')
// 是否原尺寸同步
this.isSizeSynchro = false
// 是否展示原尺寸同步下拉框
this.isShowSizeSynchro = true this.isShowSizeSynchro = true
this.imageEditor.resetZoom()
this.imageEditor.changeCursor('auto');
this.isShowsizeOptions = true this.isShowsizeOptions = true
this.issize = true this.issize = true
this.ismoderate = false this.ismoderate = false
// 特征点图层缩放设置为1 // 特征点图层缩放设置为1
$('.tzdDrawing').css('transform', 'scale(1)'); $('.tzdDrawing').css('transform', 'scale(1)');
// 移动图片 // // 是否原尺寸同步
this.imageEditor._graphics.setImageProperties({ // this.isSizeSynchro = false
left: 0, // 是否展示原尺寸同步下拉框
top: 0, // this.imageEditor.resetZoom()
originX: 'left', // this.imageEditor.changeCursor('auto');
originY: 'top' // // 移动图片
}, true) // this.imageEditor._graphics.setImageProperties({
// left: 0,
// top: 0,
// originX: 'left',
// originY: 'top'
// }, true)
} else { } else {
$('.icon_size').css('background', 'rgba(5, 95, 231, 0.05)') $('.icon_size').css('background', 'rgba(5, 95, 231, 0.05)')
// 是否原尺寸同步 // 是否原尺寸同步
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 11:36:10 * @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-09 10:05:10 * @LastEditTime: 2021-11-09 10:22:32
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...@@ -995,7 +995,7 @@ export default { ...@@ -995,7 +995,7 @@ export default {
self.inputRotationRange = 0 self.inputRotationRange = 0
// 事件不能连续重复执行,需要缓存时间 // 事件不能连续重复执行,需要缓存时间
self.startPlace = 0; self.startPlace = 0;
setTimeout(() => { setTimeout(() => {
imageEditor.setAngle(0)['catch'](function () { }); imageEditor.setAngle(0)['catch'](function () { });
}, 200); }, 200);
......
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