From 2154ace6bdc2abe55fae353849d3beb64b8ada25 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 24 May 2012 16:14:40 -0700 Subject: Don't loop through layout drawing code if layout view is off. Signed-off-by: Nivesh Rajbhandari --- js/stage/layout.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'js/stage') 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, { value: function() { this.clearCanvas(); + // TODO Bind the layoutview mode to the current document + // var mode = this.application.ninja.currentDocument.layoutMode; + if(this.layoutView === "layoutOff") return; + var els = this.elementsToDraw.length; for(var i = 0, el; i < els; i++){ this.drawTagOutline(this.elementsToDraw[i]); @@ -154,11 +158,6 @@ exports.Layout = Montage.create(Component, { if(!item || !this.application.ninja.selectionController.isNodeTraversable(item)) return; - // TODO Bind the layoutview mode to the current document - // var mode = this.application.ninja.currentDocument.layoutMode; - - if(this.layoutView === "layoutOff") return; - // Don't draw outlines for shapes. // TODO Use the element mediator/controller/model to see if its a shape // if (utilsModule.utils.isElementAShape(item)) return; -- cgit v1.2.3