From 20797b8cc35ee17aa6f456b39752a3636417863a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 22 Oct 2012 17:38:40 -0700 Subject: [PATCH] Avoid name clash between View._handlers and Callback._handlers that keeps track of installed handlers. Closes #109. --- src/ui/View.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/View.js b/src/ui/View.js index c20e7187..f53566ba 100644 --- a/src/ui/View.js +++ b/src/ui/View.js @@ -92,7 +92,7 @@ var View = this.View = Base.extend(Callback, /** @lends View# */{ if (this._id == null) element.setAttribute('id', this._id = 'view-' + View._id++); // Install event handlers - DomEvent.add(element, this._handlers); + DomEvent.add(element, this._viewHandlers); // If the element has the resize attribute, resize the it to fill the // window and resize it again whenever the user resizes the window. if (PaperScript.hasAttribute(element, 'resize')) { @@ -172,7 +172,7 @@ var View = this.View = Base.extend(Callback, /** @lends View# */{ if (this._project.view == this) this._project.view = null; // Uninstall event handlers again for this view. - DomEvent.remove(this._element, this._handlers); + DomEvent.remove(this._element, this._viewHandlers); DomEvent.remove(window, this._windowHandlers); this._element = this._project = null; // Removing all onFrame handlers makes the _onFrameCallback handler stop @@ -594,7 +594,7 @@ var View = this.View = Base.extend(Callback, /** @lends View# */{ }); return { - _handlers: { + _viewHandlers: { mousedown: mousedown, touchstart: mousedown, selectstart: selectstart