Browse Source

Add destroy method to UndoManager module

pull/3147/head
Artur Arseniev 6 years ago
parent
commit
5017f641b0
  1. 2
      src/editor/model/Editor.js
  2. 6
      src/undo_manager/index.js

2
src/editor/model/Editor.js

@ -775,7 +775,7 @@ export default Backbone.Model.extend({
this.stopDefault();
DomComponents.destroy();
CssComposer.destroy();
UndoManager.clear().removeAll();
UndoManager.destroy();
Panels.destroy();
Canvas.destroy();
Keymaps.destroy();

6
src/undo_manager/index.js

@ -293,6 +293,12 @@ export default () => {
getInstance() {
return um;
},
destroy() {
this.clear().removeAll();
[em, um, config, beforeCache].forEach(i => (i = {}));
this.em = {};
}
};
};

Loading…
Cancel
Save