hide generator on lock

This commit is contained in:
antelle 2016-04-15 22:27:48 +03:00
parent 09afe56efa
commit e26e902943
1 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,7 @@ var FooterView = Backbone.View.extend({
KeyHandler.onKey(Keys.DOM_VK_S, this.saveAll, this, KeyHandler.SHORTCUT_ACTION);
KeyHandler.onKey(Keys.DOM_VK_COMMA, this.toggleSettings, this, KeyHandler.SHORTCUT_ACTION);
this.listenTo(this, 'hide', this.viewHidden);
this.listenTo(this.model.files, 'update reset change', this.render);
this.listenTo(UpdateModel.instance, 'change:updateStatus', this.render);
},
@ -39,6 +40,13 @@ var FooterView = Backbone.View.extend({
return this;
},
viewHidden: function() {
if (this.views.gen) {
this.views.gen.remove();
delete this.views.gen;
}
},
lockWorkspace: function() {
Backbone.trigger('lock-workspace');
},