diff options
author | Eric Guzman | 2012-02-16 14:20:40 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-16 14:20:40 -0800 |
commit | 6960f62a84b946c92a59e5f5dc537a818f9f62b8 (patch) | |
tree | 49cbff3fdd8dab11846e5a278406915ec0ec1508 /js/stage | |
parent | 82b1a273219f0ae3d119e156c7acccdbe478f441 (diff) | |
parent | 81942bd52f0713c9ff5d479ebd12fce577f45e45 (diff) | |
download | ninja-6960f62a84b946c92a59e5f5dc537a818f9f62b8.tar.gz |
Merge branch 'refs/heads/master' into PresetsPanel
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index 31ace49c..cd19f361 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js | |||
@@ -123,7 +123,7 @@ exports.StageView = Montage.create(Component, { | |||
123 | switchDocument:{ | 123 | switchDocument:{ |
124 | value: function(doc){ | 124 | value: function(doc){ |
125 | //save editor cursor position | 125 | //save editor cursor position |
126 | if(!!this.application.ninja.documentController.activeDocument.editor){ | 126 | if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ |
127 | this.application.ninja.documentController.activeDocument.hline = this.application.ninja.documentController.activeDocument.editor.getCursor(true); | 127 | this.application.ninja.documentController.activeDocument.hline = this.application.ninja.documentController.activeDocument.editor.getCursor(true); |
128 | } | 128 | } |
129 | this.application.ninja.documentController._hideCurrentDocument(); | 129 | this.application.ninja.documentController._hideCurrentDocument(); |
@@ -136,7 +136,7 @@ exports.StageView = Montage.create(Component, { | |||
136 | var documentController = this.application.ninja.documentController; | 136 | var documentController = this.application.ninja.documentController; |
137 | 137 | ||
138 | //restore editor cursor position | 138 | //restore editor cursor position |
139 | if(!!this.application.ninja.documentController.activeDocument.editor){ | 139 | if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ |
140 | this.application.ninja.documentController.activeDocument.editor.setCursor(this.application.ninja.documentController.activeDocument.hline); | 140 | this.application.ninja.documentController.activeDocument.editor.setCursor(this.application.ninja.documentController.activeDocument.hline); |
141 | document.getElementById("codeMirror_"+this.application.ninja.documentController.activeDocument.uuid).getElementsByClassName("CodeMirror")[0].focus(); | 141 | document.getElementById("codeMirror_"+this.application.ninja.documentController.activeDocument.uuid).getElementsByClassName("CodeMirror")[0].focus(); |
142 | } | 142 | } |
@@ -187,7 +187,6 @@ exports.StageView = Montage.create(Component, { | |||
187 | }, | 187 | }, |
188 | hideOtherDocuments:{ | 188 | hideOtherDocuments:{ |
189 | value:function(docUuid){ | 189 | value:function(docUuid){ |
190 | //use CodeMirror toTextArea() to remove editor and save content into textarea | ||
191 | this.application.ninja.documentController._documents.forEach(function(aDoc){ | 190 | this.application.ninja.documentController._documents.forEach(function(aDoc){ |
192 | if(aDoc.currentView === "design"){ | 191 | if(aDoc.currentView === "design"){ |
193 | aDoc.container.parentNode.style["display"] = "none"; | 192 | aDoc.container.parentNode.style["display"] = "none"; |