aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/code-editor-controller.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/controllers/code-editor-controller.js b/js/controllers/code-editor-controller.js
index 52eb47eb..cf0503a0 100644
--- a/js/controllers/code-editor-controller.js
+++ b/js/controllers/code-editor-controller.js
@@ -49,9 +49,13 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone
49 editorFont:{ 49 editorFont:{
50 get: function(){return this._editorFont;}, 50 get: function(){return this._editorFont;},
51 set: function(value){//gets a zoom % 51 set: function(value){//gets a zoom %
52 var codeLineElems = null, i=0;
52 this._editorFont = (value/100) * CodeEditorController.originalEditorFont; 53 this._editorFont = (value/100) * CodeEditorController.originalEditorFont;
53 //set the font size 54 //set the font size
54 document.getElementsByClassName("codeViewContainer")[0].style.fontSize = ""+this._editorFont+"px"; 55 codeLineElems = document.getElementsByClassName("CodeMirror-lines");
56 for(i=0;i<codeLineElems.length;i++){
57 codeLineElems[i].style.fontSize = ""+this._editorFont+"px";
58 }
55 } 59 }
56 }, 60 },
57 61
@@ -182,6 +186,12 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone
182 var range = this.getSelectedRange(this.application.ninja.documentController.activeDocument.editor); 186 var range = this.getSelectedRange(this.application.ninja.documentController.activeDocument.editor);
183 this.application.ninja.documentController.activeDocument.editor.commentRange(isComment, range.from, range.to); 187 this.application.ninja.documentController.activeDocument.editor.commentRange(isComment, range.from, range.to);
184 } 188 }
189 },
190
191 handleThemeSelection:{
192 value: function(theme){
193 this.application.ninja.documentController.activeDocument.editor.setOption("theme", theme);
194 }
185 } 195 }
186 196
187}); \ No newline at end of file 197}); \ No newline at end of file