Commit e3d7ccc 1 parent eefa808 commit e3d7ccc Copy full SHA for e3d7ccc
File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ export default {
94
94
this . handlePointMoveProp ( pos )
95
95
}
96
96
let up = ( ) => {
97
+ this . handlePointMouseUpProp ( )
97
98
document . removeEventListener ( 'mousemove' , move )
98
99
document . removeEventListener ( 'mouseup' , up )
99
100
}
@@ -125,6 +126,7 @@ export default {
125
126
}
126
127
127
128
let up = moveEvent => {
129
+ this . handleElementMouseUpProp ( )
128
130
document . removeEventListener ( 'mousemove' , move , true )
129
131
document . removeEventListener ( 'mouseup' , up , true )
130
132
}
Original file line number Diff line number Diff line change 1
1
2
2
import { cloneDeep } from 'lodash'
3
3
import undoRedoHistory from './History'
4
- const unRecordHistoryMutationTypes = [ 'element/setElementCommonStyle' ]
4
+ /**
5
+ * #!zh: setElementCommonStyle 因为是在 mousemove 时候触发的,执行过于频繁,没有必要计入history,因此需要过滤。
6
+ * 主要记录:拖动完成时候(mouseup)时候的位置、删除元素之前的状态等
7
+ */
8
+ const unRecordHistoryMutationTypes = [ 'editor/setElementCommonStyle' ]
5
9
6
10
const undoRedoPlugin = ( store ) => {
7
11
// initialize and save the starting stage
You can’t perform that action at this time.
0 commit comments