Commit 5a2faa21 by maxiaohan

Merge remote-tracking branch 'origin/dev_zwpt' into dev_zwpt

parents 4e1a6e5c f20ca0c9
<!--
* @Author: your name
* @Date: 2021-09-09 09:28:46
* @LastEditTime: 2021-11-05 11:14:14
* @LastEditTime: 2021-11-06 16:08:26
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\cxyrd\LTz.vue
......@@ -929,13 +929,16 @@ export default {
console.log(objectProps,22222222);
if (objectProps.type == 'line') {
self.lines.push(objectProps)
self.historys.push('直线')
}else if(objectProps.type == 'path'){
self.path.push(objectProps)
self.historys.push('曲线')
}
// self.historys.push(objectProps.type)
console.log(111);
},
undoStackChanged: function (length) {
console.log(length,'undoStackChanged')
if (length) {
$btnUndo.removeClass('disabled');
} else {
......@@ -944,6 +947,7 @@ export default {
resizeEditor();
},
redoStackChanged: function (length) {
console.log(length,'redoStackChanged')
if (length) {
$btnRedo.removeClass('disabled');
} else {
......@@ -1006,8 +1010,10 @@ export default {
console.log('imageEditor2======',objectProps)
if (objectProps.type == 'line') {
self.lines2.push(objectProps)
self.historys2.push('直线')
}else if(objectProps.type == 'path'){
self.path2.push(objectProps)
self.historys2.push('曲线')
}
},
undoStackChanged: function (length) {
......@@ -1073,33 +1079,23 @@ export default {
// 撤回
$btnUndo.on('click', function () {
self.initStatus()
console.log('撤销');
if (self.type == 'source') {
if (!$(this).hasClass('disabled')) {
if (self.type == 'source' && !imageEditor.isEmptyUndoStack()) {
imageEditor.discardSelection();
imageEditor.undo();
}
} else {
if (!$(this).hasClass('disabled2')) {
} else if(!imageEditor2.isEmptyUndoStack()){
imageEditor2.discardSelection();
imageEditor2.undo();
}
}
});
// 恢复
$btnRedo.on('click', function () {
console.log('恢复');
if (self.type == 'source') {
if (!$(this).hasClass('disabled')) {
if (self.type == 'source' && !imageEditor.isEmptyRedoStack()) {
imageEditor.discardSelection();
imageEditor.redo();
}
} else {
if (!$(this).hasClass('disabled2')) {
} else if(!imageEditor2.isEmptyRedoStack()){
imageEditor2.discardSelection();
imageEditor2.redo();
}
}
});
......@@ -1629,10 +1625,8 @@ export default {
imageEditor.stopDrawingMode();
if (mode === 'freeDrawing') {
imageEditor.startDrawingMode('FREE_DRAWING', settings);
self.historys.push('辅助线')
} else {
imageEditor.startDrawingMode('LINE_DRAWING', settings);
self.historys.push('辅助线')
}
if (!self.isLineOptions) {
imageEditor.stopDrawingMode();
......@@ -1641,10 +1635,8 @@ export default {
imageEditor2.stopDrawingMode();
if (mode === 'freeDrawing') {
imageEditor2.startDrawingMode('FREE_DRAWING', settings);
self.historys2.push('辅助线')
} else {
imageEditor2.startDrawingMode('LINE_DRAWING', settings);
self.historys2.push('辅助线')
}
if (!self.isLineOptions) {
imageEditor2.stopDrawingMode();
......
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