aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-24 16:14:40 -0700
committerNivesh Rajbhandari2012-05-24 16:14:40 -0700
commit2154ace6bdc2abe55fae353849d3beb64b8ada25 (patch)
tree35d0e28004b6e53d870cddf6c7568f1874a9777a
parentfd4af6d81725dfa0630ac5e52ba95405336f4074 (diff)
downloadninja-2154ace6bdc2abe55fae353849d3beb64b8ada25.tar.gz
Don't loop through layout drawing code if layout view is off.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
-rwxr-xr-xjs/stage/layout.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index 460c8b4a..7b4ccc17 100755
--- a/js/stage/layout.js
+++ b/js/stage/layout.js
@@ -121,6 +121,10 @@ exports.Layout = Montage.create(Component, {
121 value: function() { 121 value: function() {
122 this.clearCanvas(); 122 this.clearCanvas();
123 123
124 // TODO Bind the layoutview mode to the current document
125 // var mode = this.application.ninja.currentDocument.layoutMode;
126 if(this.layoutView === "layoutOff") return;
127
124 var els = this.elementsToDraw.length; 128 var els = this.elementsToDraw.length;
125 for(var i = 0, el; i < els; i++){ 129 for(var i = 0, el; i < els; i++){
126 this.drawTagOutline(this.elementsToDraw[i]); 130 this.drawTagOutline(this.elementsToDraw[i]);
@@ -154,11 +158,6 @@ exports.Layout = Montage.create(Component, {
154 158
155 if(!item || !this.application.ninja.selectionController.isNodeTraversable(item)) return; 159 if(!item || !this.application.ninja.selectionController.isNodeTraversable(item)) return;
156 160
157 // TODO Bind the layoutview mode to the current document
158 // var mode = this.application.ninja.currentDocument.layoutMode;
159
160 if(this.layoutView === "layoutOff") return;
161
162 // Don't draw outlines for shapes. 161 // Don't draw outlines for shapes.
163 // TODO Use the element mediator/controller/model to see if its a shape 162 // TODO Use the element mediator/controller/model to see if its a shape
164 // if (utilsModule.utils.isElementAShape(item)) return; 163 // if (utilsModule.utils.isElementAShape(item)) return;