From 83d81635f8e728a8ac73f9735487648b098c2d86 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 5 Apr 2012 14:37:33 +0200 Subject: [PATCH] remove event delegation --- lib/ace/editor.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index b2f58853..1d2e493c 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -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();