Add setFontSize on Split
This commit is contained in:
parent
cb6a93a8ce
commit
ffeda1ae05
2 changed files with 11 additions and 3 deletions
|
|
@ -304,7 +304,7 @@ exports.launch = function(env) {
|
|||
});
|
||||
|
||||
bindDropdown("fontsize", function(value) {
|
||||
document.getElementById("editor").style.fontSize = value;
|
||||
env.split.setFontSize(value);
|
||||
});
|
||||
|
||||
bindDropdown("soft_wrap", function(value) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ var Split = function(container, theme, splits) {
|
|||
dom.className = this.$editorCSS;
|
||||
dom.style = "position: absolute; top:0px; bottom:0px";
|
||||
this.$container.appendChild(dom);
|
||||
|
||||
var session = new EditSession("");
|
||||
var editor = new Editor(new Renderer(dom, this.$theme));
|
||||
|
||||
|
|
@ -84,6 +83,7 @@ var Split = function(container, theme, splits) {
|
|||
}.bind(this));
|
||||
|
||||
this.$editors.push(editor);
|
||||
editor.container.style.fontSize = this.$fontSize;
|
||||
return editor;
|
||||
}
|
||||
|
||||
|
|
@ -99,6 +99,7 @@ var Split = function(container, theme, splits) {
|
|||
while (this.$splits < this.$editors.length && this.$splits < splits) {
|
||||
var editor = this.$editors[this.$splits];
|
||||
this.$container.appendChild(editor.container);
|
||||
editor.container.style.fontSize = this.$fontSize;
|
||||
this.$splits ++;
|
||||
}
|
||||
while (this.$splits < splits) {
|
||||
|
|
@ -148,7 +149,14 @@ var Split = function(container, theme, splits) {
|
|||
}
|
||||
|
||||
this.forEach = function(callback, scope) {
|
||||
this.$ditors.forEach(callback, scope);
|
||||
this.$editors.forEach(callback, scope);
|
||||
}
|
||||
|
||||
this.setFontSize = function(size) {
|
||||
this.$fontSize = size;
|
||||
this.forEach(function(editor) {
|
||||
editor.container.style.fontSize = size;
|
||||
});
|
||||
}
|
||||
|
||||
this.$cloneSession = function(session) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue