From eac9b71b958239af323cb0d7f2a37928adb9ac81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 7 Apr 2014 16:57:02 +0200 Subject: [PATCH] Set shouldStopEvent to identity in DragBox This fixes a bug where the map is panned when boxes are drawn. --- src/ol/interaction/dragboxinteraction.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index 62ea2488d0..998fb985bd 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -6,6 +6,7 @@ goog.provide('ol.interaction.DragBox'); goog.require('goog.asserts'); goog.require('goog.events.Event'); +goog.require('goog.functions'); goog.require('ol.events.ConditionType'); goog.require('ol.events.condition'); goog.require('ol.interaction.Pointer'); @@ -192,3 +193,9 @@ ol.interaction.DragBox.prototype.handlePointerDown = return false; } }; + + +/** + * @inheritDoc + */ +ol.interaction.DragBox.prototype.shouldStopEvent = goog.functions.identity;