diff options
author | Ananya Sen | 2012-04-18 00:29:52 -0700 |
---|---|---|
committer | Ananya Sen | 2012-04-18 00:29:52 -0700 |
commit | ea4385add0e9087487ccded929c2d6674d326db8 (patch) | |
tree | 8018ac37696540c9e8609223c35ce458b70e26d3 /js/stage | |
parent | 35abad196cc9feb76ef50c1b63032a38233a6d51 (diff) | |
download | ninja-ea4385add0e9087487ccded929c2d6674d326db8.tar.gz |
- collapse panels for code view, restore for design view
- apply theme selection to all code view documents
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index c06ad988..bc8b469c 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js | |||
@@ -102,6 +102,7 @@ exports.StageView = Montage.create(Component, { | |||
102 | this.application.ninja.documentController.activeDocument = doc; | 102 | this.application.ninja.documentController.activeDocument = doc; |
103 | this.application.ninja.stage.hideCanvas(true); | 103 | this.application.ninja.stage.hideCanvas(true); |
104 | document.getElementById("iframeContainer").style.display="none";//hide the iframe when switching to code view | 104 | document.getElementById("iframeContainer").style.display="none";//hide the iframe when switching to code view |
105 | this.collapseAllPanels(); | ||
105 | } | 106 | } |
106 | }, | 107 | }, |
107 | 108 | ||
@@ -128,11 +129,14 @@ exports.StageView = Montage.create(Component, { | |||
128 | //focus editor | 129 | //focus editor |
129 | if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ | 130 | if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ |
130 | this.application.ninja.documentController.activeDocument.editor.focus(); | 131 | this.application.ninja.documentController.activeDocument.editor.focus(); |
132 | this.application.ninja.codeEditorController.handleThemeSelection(); | ||
133 | this.collapseAllPanels(); | ||
131 | } | 134 | } |
132 | 135 | ||
133 | if(this.application.ninja.documentController.activeDocument.currentView === "design") { | 136 | if(this.application.ninja.documentController.activeDocument.currentView === "design") { |
134 | this.application.ninja.stage._scrollFlag = true; // TODO HACK to prevent type error on Hide/Show Iframe | 137 | this.application.ninja.stage._scrollFlag = true; // TODO HACK to prevent type error on Hide/Show Iframe |
135 | this.application.ninja.stage.stageDeps.reinitializeForSwitchDocument();//reinitialize draw-util, snapmanager and view-util | 138 | this.application.ninja.stage.stageDeps.reinitializeForSwitchDocument();//reinitialize draw-util, snapmanager and view-util |
139 | this.restoreAllPanels(); | ||
136 | } | 140 | } |
137 | 141 | ||
138 | NJevent("switchDocument"); | 142 | NJevent("switchDocument"); |
@@ -182,5 +186,22 @@ exports.StageView = Montage.create(Component, { | |||
182 | this.application.ninja.editorViewOptions.element.style.display = "none"; | 186 | this.application.ninja.editorViewOptions.element.style.display = "none"; |
183 | } | 187 | } |
184 | } | 188 | } |
189 | }, | ||
190 | |||
191 | collapseAllPanels:{ | ||
192 | value:function(){ | ||
193 | this.application.ninja.panelSplitter.collapse(); | ||
194 | this.application.ninja.timelineSplitter.collapse(); | ||
195 | this.application.ninja.toolsSplitter.collapse(); | ||
196 | this.application.ninja.optionsSplitter.collapse(); | ||
197 | } | ||
198 | }, | ||
199 | restoreAllPanels:{ | ||
200 | value:function(){ | ||
201 | this.application.ninja.panelSplitter.restore(); | ||
202 | this.application.ninja.timelineSplitter.restore(); | ||
203 | this.application.ninja.toolsSplitter.restore(); | ||
204 | this.application.ninja.optionsSplitter.restore(); | ||
205 | } | ||
185 | } | 206 | } |
186 | }); \ No newline at end of file | 207 | }); \ No newline at end of file |