From 6adedacaf8c7bdcb3bef5f3a6c3dce1329246a3e Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 18 Jun 2013 16:53:03 +0200 Subject: [PATCH] Only pan the map when the mouse action button is pressed --- src/ol/interaction/dragpaninteraction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/interaction/dragpaninteraction.js b/src/ol/interaction/dragpaninteraction.js index 9f8220f0c2..2cd2088d10 100644 --- a/src/ol/interaction/dragpaninteraction.js +++ b/src/ol/interaction/dragpaninteraction.js @@ -106,7 +106,7 @@ ol.interaction.DragPan.prototype.handleDragEnd = function(mapBrowserEvent) { */ ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) { var browserEvent = mapBrowserEvent.browserEvent; - if (this.condition_(browserEvent)) { + if (browserEvent.isMouseActionButton() && this.condition_(browserEvent)) { if (this.kinetic_) { this.kinetic_.begin(); this.kinetic_.update(browserEvent.clientX, browserEvent.clientY);