cleanup
This commit is contained in:
parent
37fc612756
commit
7b80bb793e
4 changed files with 15 additions and 6 deletions
|
|
@ -90,7 +90,7 @@ var Autocomplete = function() {
|
|||
this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
|
||||
this.editor.off("changeSelection", 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.changeTimer.cancel();
|
||||
|
||||
|
|
|
|||
|
|
@ -217,8 +217,11 @@ var optionsProvider = {
|
|||
if (this["$" + name] === value)
|
||||
return;
|
||||
var opt = this.$options[name];
|
||||
if (!opt)
|
||||
if (!opt) {
|
||||
if (typeof console != "undefined" && console.error)
|
||||
console.error('misspelled option "' + name + '"');
|
||||
return undefined;
|
||||
}
|
||||
if (opt.forwardTo)
|
||||
return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
|
||||
|
||||
|
|
@ -229,8 +232,11 @@ var optionsProvider = {
|
|||
},
|
||||
getOption: function(name) {
|
||||
var opt = this.$options[name];
|
||||
if (!opt)
|
||||
if (!opt) {
|
||||
if (typeof console != "undefined" && console.error)
|
||||
console.error('misspelled option "' + name + '"');
|
||||
return undefined;
|
||||
}
|
||||
if (opt.forwardTo)
|
||||
return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
|
||||
return opt && opt.get ? opt.get.call(this) : this["$" + name];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue