From e065244ac75d1d0f25fd5c75cb58e714a13fe16b Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 14 Mar 2012 08:59:17 -0700 Subject: Squashed commit of the following: merge master into timeline Signed-off-by: Jonathan Duran --- js/stage/layout.js | 10 ++++++---- js/stage/stage-view.reel/stage-view.js | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'js/stage') diff --git a/js/stage/layout.js b/js/stage/layout.js index de4c67c1..8a53a08b 100755 --- a/js/stage/layout.js +++ b/js/stage/layout.js @@ -65,8 +65,9 @@ exports.Layout = Montage.create(Component, { handleOpenDocument: { value: function() { // Initial elements to draw is the entire node list - this.elementsToDraw = this.application.ninja.documentController.activeDocument._liveNodeList; - + if(this.application.ninja.documentController.activeDocument.currentView === "design"){//only for designer view + this.elementsToDraw = this.application.ninja.documentController.activeDocument._liveNodeList; + } // Draw the elements and the 3d info this.draw(); this.draw3DInfo(false); @@ -104,8 +105,9 @@ exports.Layout = Montage.create(Component, { } // Make an array copy of the line node list which is not an array like object - this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0); - + if(this.application.ninja.documentController.activeDocument.currentView === "design"){//only for designer view + this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0); + } // Clear the elements to draw this.elementsToDraw.length = 0; diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index 91047e51..ad67cada 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js @@ -125,6 +125,10 @@ exports.StageView = Montage.create(Component, { this.application.ninja.documentController.activeDocument = doc; + if(this.application.ninja.documentController.activeDocument.currentView === "design") { + this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument; + } + this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe this.application.ninja.documentController._showCurrentDocument(); @@ -135,7 +139,6 @@ exports.StageView = Montage.create(Component, { if(this.application.ninja.documentController.activeDocument.currentView === "design") { this.application.ninja.stage._scrollFlag = true; // TODO HACK to prevent type error on Hide/Show Iframe - this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument; //reinitialize draw-util, snapmanager and view-util this.application.ninja.stage.stageDeps.reinitializeForSwitchDocument(); -- cgit v1.2.3