Fix: 修复重载Blockly workspace时代码区不同步刷新
This commit is contained in:
@@ -213,7 +213,6 @@ class EditorBlockly extends EditorBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.reloadWorkspace = () => {
|
this.reloadWorkspace = () => {
|
||||||
Blockly.Events.disable();
|
|
||||||
let workspaceState = Blockly.serialization.workspaces.save(this.editor);
|
let workspaceState = Blockly.serialization.workspaces.save(this.editor);
|
||||||
let undoStack = [...this.editor.undoStack_];
|
let undoStack = [...this.editor.undoStack_];
|
||||||
let redoStack = [...this.editor.redoStack_];
|
let redoStack = [...this.editor.redoStack_];
|
||||||
@@ -222,7 +221,6 @@ class EditorBlockly extends EditorBase {
|
|||||||
});
|
});
|
||||||
this.editor.undoStack_ = [...undoStack];
|
this.editor.undoStack_ = [...undoStack];
|
||||||
this.editor.redoStack_ = [...redoStack];
|
this.editor.redoStack_ = [...redoStack];
|
||||||
Blockly.Events.enable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initBlockly();
|
this.initBlockly();
|
||||||
|
|||||||
Reference in New Issue
Block a user