remove event delegation

This commit is contained in:
Fabian Jakobs 2012-04-05 14:37:33 +02:00
commit 83d81635f8

View file

@ -115,7 +115,6 @@ var Editor = function(renderer, session) {
this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
this.session.removeEventListener("changeLeftTop", this.$onScrollLeftChange);
this.session.removeEventListener("loadmode", this.$onLoadMode);
var selection = this.session.getSelection();
selection.removeEventListener("changeCursor", this.$onCursorChange);
@ -167,9 +166,6 @@ var Editor = function(renderer, session) {
this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
this.$onLoadMode = this.onLoadMode.bind(this);
this.session.addEventListener("loadmode", this.$onLoadMode);
this.selection = session.getSelection();
this.selection.addEventListener("changeCursor", this.$onCursorChange);
@ -316,10 +312,6 @@ var Editor = function(renderer, session) {
this.renderer.scrollToX(this.session.getScrollLeft());
};
this.onLoadMode = function(e) {
this._emit("loadmode", e);
};
this.onCursorChange = function() {
this.renderer.updateCursor();