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.js32
1 files changed, 18 insertions, 14 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index ad67cada..66a18964 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -93,23 +93,27 @@ exports.StageView = Montage.create(Component, {
93 93
94 var documentController = this.application.ninja.documentController; 94 var documentController = this.application.ninja.documentController;
95 doc.editor = CodeMirror.fromTextArea(doc.textArea, { 95 doc.editor = CodeMirror.fromTextArea(doc.textArea, {
96 lineNumbers: true, 96 lineNumbers: true,
97 mode: type, 97 lineWrapping: true,
98 onChange: function(){ 98 matchBrackets:true,
99 var historySize = doc.editor.historySize(); 99 mode: type,
100 if(historySize.undo>0){ 100 onChange: function(){
101 doc.needsSave = true; 101 var historySize = doc.editor.historySize();
102 }else if(historySize.undo===0 && historySize.redo>0){ 102 if(historySize.undo>0){
103 doc.needsSave = false; 103 doc.needsSave = true;
104 } 104 }else if(historySize.undo===0 && historySize.redo>0){
105 }, 105 doc.needsSave = false;
106 onCursorActivity: function() {
107 //documentController._codeEditor.editor.setLineClass(documentController._codeEditor.hline, null);
108 //documentController._codeEditor.hline = documentController._codeEditor.editor.setLineClass(documentController._codeEditor.editor.getCursor().line, "activeline");
109 } 106 }
107 },
108 onCursorActivity: function() {
109 doc.editor.matchHighlight("CodeMirror-matchhighlight");
110 doc.editor.setLineClass(doc.editor.hline, null);
111 doc.editor.hline = doc.editor.setLineClass(doc.editor.getCursor().line, "activeline");
112 }
110 }); 113 });
111 114
112 //this.application.ninja.documentController._codeEditor.hline = this.application.ninja.documentController._codeEditor.editor.setLineClass(0, "activeline"); 115 doc.editor.hline = doc.editor.setLineClass(0, "activeline");
116
113 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe 117 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
114 this.application.ninja.documentController.activeDocument = doc; 118 this.application.ninja.documentController.activeDocument = doc;
115 this.application.ninja.stage.hideCanvas(true); 119 this.application.ninja.stage.hideCanvas(true);