Browse Source

Fix destoy method. Closes #3442

pull/3487/head
Artur Arseniev 5 years ago
parent
commit
d00ccb945c
  1. 2
      src/canvas/index.js
  2. 2
      src/canvas/view/CanvasView.js

2
src/canvas/index.js

@ -646,7 +646,7 @@ export default () => {
destroy() {
canvas.stopListening();
CanvasView.remove();
CanvasView && CanvasView.remove();
[c, canvas, CanvasView].forEach(i => (i = {}));
['em', 'model', 'droppable'].forEach(i => (this[i] = {}));
}

2
src/canvas/view/CanvasView.js

@ -75,9 +75,9 @@ export default Backbone.View.extend({
},
remove() {
this.frames.remove();
const frm = this.model.get('frames');
frm.remove(frm.models);
this.frames.remove();
this.frames = {};
Backbone.View.prototype.remove.apply(this, arguments);
this.toggleListeners();

Loading…
Cancel
Save