修复撤回bug

This commit is contained in:
X1627315083
2025-03-10 10:33:54 +08:00
parent ae9c3efd27
commit 1c3ad7ca62
2 changed files with 15 additions and 54 deletions

View File

@@ -103,7 +103,9 @@ class myCanvas {
document.addEventListener("keyup", this.canvasKeyUp);
initAligningGuidelines(this.canvas,true)
JSchangeType(this.canvas,'init')
this.updateCanvasState('')
// this.canvas.on('mouse:up', function(event) {
// if(this.canvasState != 'move')this.updateCanvasState('')
// });
this.canvas.on("object:added", (event)=>{
if(!this.isLoadCanvas)this.updateCanvasState('')
});
@@ -234,7 +236,8 @@ class myCanvas {
}else{
return
}
this.canvas.loadFromJSON(this.canvasState, () => {});
this.canvas.loadFromJSON(this.canvasState, () => {this.isLoadCanvas = false;});
}
}