aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/layout.js10
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js5
2 files changed, 10 insertions, 5 deletions
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, {
65 handleOpenDocument: { 65 handleOpenDocument: {
66 value: function() { 66 value: function() {
67 // Initial elements to draw is the entire node list 67 // Initial elements to draw is the entire node list
68 this.elementsToDraw = this.application.ninja.documentController.activeDocument._liveNodeList; 68 if(this.application.ninja.documentController.activeDocument.currentView === "design"){//only for designer view
69 69 this.elementsToDraw = this.application.ninja.documentController.activeDocument._liveNodeList;
70 }
70 // Draw the elements and the 3d info 71 // Draw the elements and the 3d info
71 this.draw(); 72 this.draw();
72 this.draw3DInfo(false); 73 this.draw3DInfo(false);
@@ -104,8 +105,9 @@ exports.Layout = Montage.create(Component, {
104 } 105 }
105 106
106 // Make an array copy of the line node list which is not an array like object 107 // Make an array copy of the line node list which is not an array like object
107 this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0); 108 if(this.application.ninja.documentController.activeDocument.currentView === "design"){//only for designer view
108 109 this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0);
110 }
109 // Clear the elements to draw 111 // Clear the elements to draw
110 this.elementsToDraw.length = 0; 112 this.elementsToDraw.length = 0;
111 113
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, {
125 125
126 this.application.ninja.documentController.activeDocument = doc; 126 this.application.ninja.documentController.activeDocument = doc;
127 127
128 if(this.application.ninja.documentController.activeDocument.currentView === "design") {
129 this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument;
130 }
131
128 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe 132 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
129 this.application.ninja.documentController._showCurrentDocument(); 133 this.application.ninja.documentController._showCurrentDocument();
130 134
@@ -135,7 +139,6 @@ exports.StageView = Montage.create(Component, {
135 139
136 if(this.application.ninja.documentController.activeDocument.currentView === "design") { 140 if(this.application.ninja.documentController.activeDocument.currentView === "design") {
137 this.application.ninja.stage._scrollFlag = true; // TODO HACK to prevent type error on Hide/Show Iframe 141 this.application.ninja.stage._scrollFlag = true; // TODO HACK to prevent type error on Hide/Show Iframe
138 this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument;
139 142
140 //reinitialize draw-util, snapmanager and view-util 143 //reinitialize draw-util, snapmanager and view-util
141 this.application.ninja.stage.stageDeps.reinitializeForSwitchDocument(); 144 this.application.ninja.stage.stageDeps.reinitializeForSwitchDocument();