File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ function Croquis(imageDataList, properties) {
22
22
'onup' : [ ] ,
23
23
'ontick' : [ ] ,
24
24
'onchange' : [ ] ,
25
+ 'onundo' : [ ] ,
26
+ 'onredo' : [ ] ,
25
27
'ontool' : [ ] ,
26
28
'oncanvassize' : [ ] ,
27
29
'onlayeradd' : [ ] ,
@@ -128,6 +130,7 @@ function Croquis(imageDataList, properties) {
128
130
while ( undoTransaction . length )
129
131
redoTransaction . push ( undoTransaction . pop ( ) ( ) ) ;
130
132
redoStack . push ( redoTransaction ) ;
133
+ dispatchEvent ( 'onundo' ) ;
131
134
} ;
132
135
self . redo = function ( ) {
133
136
if ( pushToTransaction )
@@ -143,6 +146,7 @@ function Croquis(imageDataList, properties) {
143
146
while ( redoTransaction . length )
144
147
undoTransaction . push ( redoTransaction . pop ( ) ( ) ) ;
145
148
undoStack . push ( undoTransaction ) ;
149
+ dispatchEvent ( 'onredo' ) ;
146
150
} ;
147
151
function pushLayerMetadataUndo ( index ) {
148
152
index = index || layerIndex ;
You can’t perform that action at this time.
0 commit comments