aboutsummaryrefslogtreecommitdiff
path: root/js/stage/stage-view.reel/stage-view.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage/stage-view.reel/stage-view.js')
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index bfbee2b6..c06ad988 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -94,6 +94,10 @@ exports.StageView = Montage.create(Component, {
94 doc.editor = this.application.ninja.codeEditorController.createEditor(doc, type); 94 doc.editor = this.application.ninja.codeEditorController.createEditor(doc, type);
95 doc.editor.hline = doc.editor.setLineClass(0, "activeline"); 95 doc.editor.hline = doc.editor.setLineClass(0, "activeline");
96 96
97 this.showCodeViewBar(true);
98
99 this.application.ninja.codeEditorController.handleCodeCompletionSupport(type);
100
97 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe 101 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
98 this.application.ninja.documentController.activeDocument = doc; 102 this.application.ninja.documentController.activeDocument = doc;
99 this.application.ninja.stage.hideCanvas(true); 103 this.application.ninja.stage.hideCanvas(true);
@@ -112,6 +116,11 @@ exports.StageView = Montage.create(Component, {
112 116
113 if(this.application.ninja.documentController.activeDocument.currentView === "design") { 117 if(this.application.ninja.documentController.activeDocument.currentView === "design") {
114 this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument; 118 this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument;
119
120 this.showCodeViewBar(false);
121 }else{
122 this.showCodeViewBar(true);
123 this.application.ninja.codeEditorController.handleCodeCompletionSupport(this.application.ninja.documentController.activeDocument.editor.getOption("mode"));
115 } 124 }
116 125
117 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe 126 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
@@ -162,5 +171,16 @@ exports.StageView = Montage.create(Component, {
162 this.application.ninja.rulerTop.style.display = "none"; 171 this.application.ninja.rulerTop.style.display = "none";
163 this.application.ninja.rulerLeft.style.display = "none"; 172 this.application.ninja.rulerLeft.style.display = "none";
164 } 173 }
174 },
175 showCodeViewBar:{
176 value:function(isCodeView){
177 if(isCodeView === true) {
178 this.application.ninja.editorViewOptions.element.style.display = "block";
179 this.application.ninja.documentBar.element.style.display = "none";
180 }else{
181 this.application.ninja.documentBar.element.style.display = "block";
182 this.application.ninja.editorViewOptions.element.style.display = "none";
183 }
184 }
165 } 185 }
166}); \ No newline at end of file 186}); \ No newline at end of file