From 9b0b1543e03ed6884d57159e8928365fa5a5b76c Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 15 Dec 2014 11:19:22 +0100 Subject: [PATCH] Allow custom mousemove conditions When configuring a Select interaction with a custom condition that includes mousemove, panning the map will not work any more. This is because the return value of handleMapBrowserEvent is determined by checking for a default condition function. By checking for the underlying event type instead, we gain flexibility with custom condition functions. --- src/ol/interaction/selectinteraction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js index 86f322f1ef..fff8ffeae2 100644 --- a/src/ol/interaction/selectinteraction.js +++ b/src/ol/interaction/selectinteraction.js @@ -179,7 +179,7 @@ ol.interaction.Select.prototype.handleMapBrowserEvent = } features.extend(selected); } - return this.condition_ == ol.events.condition.mouseMove; + return ol.events.condition.mouseMove(mapBrowserEvent); };