From b939ca24d7cd402295c649d7bd2d64d7b047b931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 13 Mar 2014 08:16:58 +0100 Subject: [PATCH] Use a more explicit variable name --- src/ol/interaction/pointerinteraction.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ol/interaction/pointerinteraction.js b/src/ol/interaction/pointerinteraction.js index ffb2d050d6..e0927ec8da 100644 --- a/src/ol/interaction/pointerinteraction.js +++ b/src/ol/interaction/pointerinteraction.js @@ -25,7 +25,7 @@ ol.interaction.Pointer = function() { * @type {boolean} * @private */ - this.handled_ = false; + this.handlingDownUpSequence_ = false; /** * @type {Object.} @@ -139,24 +139,25 @@ ol.interaction.Pointer.prototype.handleMapBrowserEvent = var stopEvent = false; var view = mapBrowserEvent.map.getView(); this.updateTrackedPointers_(mapBrowserPointerEvent); - if (this.handled_) { + if (this.handlingDownUpSequence_) { if (mapBrowserPointerEvent.type == ol.MapBrowserEvent.EventType.POINTERDRAG) { this.handlePointerDrag(mapBrowserEvent); } else if (mapBrowserPointerEvent.type == ol.MapBrowserEvent.EventType.POINTERUP) { - this.handled_ = this.handlePointerUp(mapBrowserPointerEvent); - if (!this.handled_) { + this.handlingDownUpSequence_ = + this.handlePointerUp(mapBrowserPointerEvent); + if (!this.handlingDownUpSequence_) { view.setHint(ol.ViewHint.INTERACTING, -1); } } } if (mapBrowserPointerEvent.type == ol.MapBrowserEvent.EventType.POINTERDOWN) { var handled = this.handlePointerDown(mapBrowserPointerEvent); - if (!this.handled_ && handled) { + if (!this.handlingDownUpSequence_ && handled) { view.setHint(ol.ViewHint.INTERACTING, 1); } - this.handled_ = handled; + this.handlingDownUpSequence_ = handled; stopEvent = this.shouldStopEvent(handled); } return !stopEvent;