diff options
Diffstat (limited to 'js/code-editor')
-rw-r--r-- | js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js index e2632d35..5ad36db5 100644 --- a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js +++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js | |||
@@ -51,10 +51,18 @@ exports.CodeEditorViewOptions = Montage.create(Component, { | |||
51 | 51 | ||
52 | this._currentDocument = value; | 52 | this._currentDocument = value; |
53 | 53 | ||
54 | if(!value || (this._currentDocument.currentView === "design") || ((this._currentDocument.model.views.design !== null))) { | 54 | if(!value || (this._currentDocument.currentView === "design")) { |
55 | this.visible = false; | 55 | this.visible = false; |
56 | } else { | 56 | } else if(this._currentDocument.currentView === "code") { |
57 | this.visible = true; | 57 | |
58 | if(this._currentDocument.model.views.design){//code view of design document | ||
59 | this.application.ninja.editorViewOptions.visible = false; | ||
60 | this.application.ninja.documentBar.codeEditorControls.visible = true; | ||
61 | }else if(!this._currentDocument.model.views.design){//code view for text document | ||
62 | this.application.ninja.editorViewOptions.visible = true; | ||
63 | this.application.ninja.documentBar.codeEditorControls.visible = false; | ||
64 | } | ||
65 | |||
58 | this.autocomplete = !this.codeCompletionSupport[this._currentDocument.model.file.extension]; | 66 | this.autocomplete = !this.codeCompletionSupport[this._currentDocument.model.file.extension]; |
59 | this._currentDocument.model.views.code.editor.automaticCodeHint = this.codeCompleteCheck.checked; | 67 | this._currentDocument.model.views.code.editor.automaticCodeHint = this.codeCompleteCheck.checked; |
60 | } | 68 | } |
@@ -200,6 +208,11 @@ exports.CodeEditorViewOptions = Montage.create(Component, { | |||
200 | } else { | 208 | } else { |
201 | this.autoCompleteLabel.classList.remove("disabled"); | 209 | this.autoCompleteLabel.classList.remove("disabled"); |
202 | } | 210 | } |
211 | |||
212 | //hide the zoom hottext if it is code view of a design file | ||
213 | if (this._currentDocument && this._currentDocument.model && this._currentDocument.model.views.design){ | ||
214 | this.zoomHottext.element.style.display = "none"; | ||
215 | } | ||
203 | } | 216 | } |
204 | }, | 217 | }, |
205 | 218 | ||