X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/24ad9f957d8f56a209518a28f42fbfae2e482b54..a6983a6a33c76bc7ae107c604ba73c3571aed7b8:/src/editor/modules/documentCanvas/canvas/gutter.js diff --git a/src/editor/modules/documentCanvas/canvas/gutter.js b/src/editor/modules/documentCanvas/canvas/gutter.js index b6bd665..472998a 100644 --- a/src/editor/modules/documentCanvas/canvas/gutter.js +++ b/src/editor/modules/documentCanvas/canvas/gutter.js @@ -42,11 +42,13 @@ var GutterGroupView = function(gutterView, group) { this.group.on('viewAdded', this.onViewAdded, this); this.group.on('focusToggled', this.onFocusToggled, this); + this.group.on('removed', this.remove, this); }; $.extend(GutterGroupView.prototype, { remove: function() { this.group.off('viewAdded', this.onViewAdded); this.group.off('focusToggled', this.onFocusToggled); + this.group.off('removed', this.removed); this.dom.detach(); }, onViewAdded: function(view) { @@ -84,6 +86,9 @@ $.extend(ViewGroup.prototype, Backbone.Events, { }, show: function() { this.gutter.show(this); + }, + remove: function() { + this.trigger('removed'); } });