aboutsummaryrefslogtreecommitdiff
path: root/js/ui/menu/menu-controller.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-08-07 13:27:19 -0700
committerNivesh Rajbhandari2012-08-07 13:27:19 -0700
commitda71ec8bf450438a4dc904cb348e548d01dfcb3f (patch)
tree36bae4f77a61c2c6690566c79d07f5b6bc2c3936 /js/ui/menu/menu-controller.js
parent923e760bf4a16baa82e81da6d38e671620664e8f (diff)
parent91c440a04f0108d05e663d1696027ca5601b25bc (diff)
downloadninja-da71ec8bf450438a4dc904cb348e548d01dfcb3f.tar.gz
Merge branch 'refs/heads/ninja-mqg734-master' into LineInCanvas
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;