aboutsummaryrefslogtreecommitdiff
path: root/js/ui/menu/menu-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/ui/menu/menu-controller.js')
-rw-r--r--js/ui/menu/menu-controller.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/ui/menu/menu-controller.js b/js/ui/menu/menu-controller.js
index c80745f4..ebffddf1 100644
--- a/js/ui/menu/menu-controller.js
+++ b/js/ui/menu/menu-controller.js
@@ -56,6 +56,7 @@ exports.MenuController = Montage.create(Component, {
56 if(this._currentDocument && this._currentDocument.currentView === "design") { 56 if(this._currentDocument && this._currentDocument.currentView === "design") {
57 document.application.model.show3dGrid = this._currentDocument.model.draw3DGrid; 57 document.application.model.show3dGrid = this._currentDocument.model.draw3DGrid;
58 this.topLevelMenu[2].entries[5].checked = this._currentDocument.model.draw3DGrid; 58 this.topLevelMenu[2].entries[5].checked = this._currentDocument.model.draw3DGrid;
59 this._currentDocument.addPropertyChangeListener("model.currentViewIdentifier", this, false);
59 } 60 }
60 61
61 if(!this._currentDocument) { 62 if(!this._currentDocument) {
@@ -85,6 +86,22 @@ exports.MenuController = Montage.create(Component, {
85 } 86 }
86 }, 87 },
87 88
89 handleChange: {
90 value: function(notification) {
91 if(notification.currentPropertyPath === "model.currentViewIdentifier") {
92 if(this.currentDocument.model.currentView.identifier === "design-code") {
93 this.designDocumentEnabledItems.forEach(function(index) {
94 index.enabled = false;
95 });
96 } else {
97 this.designDocumentEnabledItems.forEach(function(index) {
98 index.enabled = true;
99 });
100 }
101 }
102 }
103 },
104
88 didCreate: { 105 didCreate: {
89 value: function() { 106 value: function() {
90 var self = this; 107 var self = this;