cleanup
This commit is contained in:
parent
37fc612756
commit
7b80bb793e
4 changed files with 15 additions and 6 deletions
|
|
@ -7,9 +7,12 @@ $(function() {
|
||||||
embedded_editor = ace.edit("embedded_ace_code");
|
embedded_editor = ace.edit("embedded_ace_code");
|
||||||
embedded_editor.container.style.opacity = "";
|
embedded_editor.container.style.opacity = "";
|
||||||
editor.session.setMode("ace/mode/javascript");
|
editor.session.setMode("ace/mode/javascript");
|
||||||
editor.session.setMode("ace/mode/javascript");
|
|
||||||
embedded_editor.session.setMode("ace/mode/html");
|
embedded_editor.session.setMode("ace/mode/html");
|
||||||
|
|
||||||
|
editor.setOptions({
|
||||||
|
maxLines: 30
|
||||||
|
})
|
||||||
|
|
||||||
ace.config.loadModule("ace/ext/emmet", function() {
|
ace.config.loadModule("ace/ext/emmet", function() {
|
||||||
ace.require("ace/lib/net").loadScript("http://nightwing.github.io/emmet-core/emmet.js", function() {
|
ace.require("ace/lib/net").loadScript("http://nightwing.github.io/emmet-core/emmet.js", function() {
|
||||||
embedded_editor.setOption("enableEmmet", true);
|
embedded_editor.setOption("enableEmmet", true);
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ var Autocomplete = function() {
|
||||||
this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
|
this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
|
||||||
this.editor.off("changeSelection", this.changeListener);
|
this.editor.off("changeSelection", this.changeListener);
|
||||||
this.editor.off("blur", this.changeListener);
|
this.editor.off("blur", this.changeListener);
|
||||||
this.editor.off("mousedown", this.changeListener);
|
this.editor.off("mousedown", this.mousedownListener);
|
||||||
this.editor.off("mousewheel", this.mousewheelListener);
|
this.editor.off("mousewheel", this.mousewheelListener);
|
||||||
this.changeTimer.cancel();
|
this.changeTimer.cancel();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,8 +217,11 @@ var optionsProvider = {
|
||||||
if (this["$" + name] === value)
|
if (this["$" + name] === value)
|
||||||
return;
|
return;
|
||||||
var opt = this.$options[name];
|
var opt = this.$options[name];
|
||||||
if (!opt)
|
if (!opt) {
|
||||||
|
if (typeof console != "undefined" && console.error)
|
||||||
|
console.error('misspelled option "' + name + '"');
|
||||||
return undefined;
|
return undefined;
|
||||||
|
}
|
||||||
if (opt.forwardTo)
|
if (opt.forwardTo)
|
||||||
return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
|
return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
|
||||||
|
|
||||||
|
|
@ -229,8 +232,11 @@ var optionsProvider = {
|
||||||
},
|
},
|
||||||
getOption: function(name) {
|
getOption: function(name) {
|
||||||
var opt = this.$options[name];
|
var opt = this.$options[name];
|
||||||
if (!opt)
|
if (!opt) {
|
||||||
|
if (typeof console != "undefined" && console.error)
|
||||||
|
console.error('misspelled option "' + name + '"');
|
||||||
return undefined;
|
return undefined;
|
||||||
|
}
|
||||||
if (opt.forwardTo)
|
if (opt.forwardTo)
|
||||||
return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
|
return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
|
||||||
return opt && opt.get ? opt.get.call(this) : this["$" + name];
|
return opt && opt.get ? opt.get.call(this) : this["$" + name];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue