From 0e37f861561e74fb9b9278f7e051c9a80b540bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 8 May 2011 10:07:10 +0100 Subject: [PATCH] Fix porting mistakes. --- src/tool/ToolHandler.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/tool/ToolHandler.js b/src/tool/ToolHandler.js index 44e48d8a..87faec5f 100644 --- a/src/tool/ToolHandler.js +++ b/src/tool/ToolHandler.js @@ -129,19 +129,18 @@ var ToolHandler = this.ToolHandler = Base.extend({ // not check the first call for a change of position. // Subsequent calls required by min/maxDistance functionality // will require it, otherwise this might loop endlessly. - this.needsChange = false; + var needsChange = false, // If the mouse is moving faster than maxDistance, do not // produce events for what is left after the first event is // generated in case it is shorter than maxDistance, as this // would produce weird results. matchMaxDistance controls this. - this.matchMaxDistance = false; + matchMaxDistance = false; while (this.updateEvent(type, pt, this.minDistance, - this.maxDistance, false, this.needsChange, - this.matchMaxDistance)) { + this.maxDistance, false, needsChange, matchMaxDistance)) { if (this.onMouseDrag) this.onMouseDrag(new ToolEvent(this, type, event)); - this.needsChange = true; - this.matchMaxDistance = true; + needsChange = true; + matchMaxDistance = true; } break; case 'mouse-up': @@ -157,7 +156,7 @@ var ToolHandler = this.ToolHandler = Base.extend({ false, false); if (this.onMouseUp) this.onMouseUp(new ToolEvent(this, type, event)); - // Start with new values for TRACK_CURSOR + // Start with new values for 'mouse-move' this.updateEvent(type, pt, null, null, true, false, false); this.firstMove = true; break;