From 47c343ce4ff0adc3cfe3aab0a3f16aa312db8ee0 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 26 Sep 2012 18:27:12 +0200 Subject: [PATCH] We can rely on the click event No need to use the mousedown/touchstart event here, because the click event gives us both clientX/clientY and button on touch devices. --- src/ol/mapbrowserevent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/mapbrowserevent.js b/src/ol/mapbrowserevent.js index d63ad18b4a..cf12f72678 100644 --- a/src/ol/mapbrowserevent.js +++ b/src/ol/mapbrowserevent.js @@ -160,9 +160,9 @@ ol.MapBrowserEventHandler.prototype.touchEnableBrowserEvent_ = */ ol.MapBrowserEventHandler.prototype.click_ = function(browserEvent) { if (!this.dragged_) { - this.touchEnableBrowserEvent_(this.down_); + this.touchEnableBrowserEvent_(browserEvent); var newEvent = new ol.MapBrowserEvent( - ol.MapBrowserEvent.EventType.CLICK, this.map_, this.down_); + ol.MapBrowserEvent.EventType.CLICK, this.map_, browserEvent); this.down_ = null; this.dispatchEvent(newEvent); }