diff options
Diffstat (limited to 'js/stage/stage-view.reel/stage-view.js')
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index 91047e51..1f471431 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(); |
@@ -197,14 +200,18 @@ exports.StageView = Montage.create(Component, { | |||
197 | }, | 200 | }, |
198 | showRulers:{ | 201 | showRulers:{ |
199 | value:function(){ | 202 | value:function(){ |
200 | this.application.ninja.rulerTop.style.background = "url('../images/temp/ruler-top.png')"; | 203 | this.application.ninja.rulerTop.style.display = "block"; |
201 | this.application.ninja.rulerLeft.style.background = "url('../images/temp/ruler-left.png')"; | 204 | this.application.ninja.rulerLeft.style.display = "block"; |
205 | // this.application.ninja.rulerTop.style.background = "url('../images/temp/ruler-top.png')"; | ||
206 | // this.application.ninja.rulerLeft.style.background = "url('../images/temp/ruler-left.png')"; | ||
202 | } | 207 | } |
203 | }, | 208 | }, |
204 | hideRulers:{ | 209 | hideRulers:{ |
205 | value:function(){ | 210 | value:function(){ |
206 | this.application.ninja.rulerTop.style.background = "rgb(128,128,128)"; | 211 | this.application.ninja.rulerTop.style.display = "none"; |
207 | this.application.ninja.rulerLeft.style.background = "rgb(128,128,128)"; | 212 | this.application.ninja.rulerLeft.style.display = "none"; |
213 | // this.application.ninja.rulerTop.style.background = "rgb(128,128,128)"; | ||
214 | // this.application.ninja.rulerLeft.style.background = "rgb(128,128,128)"; | ||
208 | } | 215 | } |
209 | }, | 216 | }, |
210 | 217 | ||