feat:撤销重做按钮命令注册

This commit is contained in:
黄云飞
2021-11-13 23:38:15 +08:00
parent 6dae6084df
commit ac1a072bf9
2 changed files with 16 additions and 4 deletions
+4 -4
View File
@@ -7,16 +7,16 @@ export class Command {
constructor(draw: Draw) {
const historyManager = draw.getHistoryManager()
this.undo = historyManager.undo
this.redo = historyManager.redo
this.undo = historyManager.undo.bind(historyManager)
this.redo = historyManager.redo.bind(historyManager)
}
public executeUndo() {
return this.undo
return this.undo()
}
public executeRedo() {
return this.redo
return this.redo()
}
}