From 7822f5ce5df3694128a66dc18682ff6defe529bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Wed, 17 Feb 2016 13:18:06 +0100 Subject: [PATCH] Consider multi in add/remove/toggle select logic --- src/ol/interaction/selectinteraction.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js index 02da1f19ca..dbc2af2263 100644 --- a/src/ol/interaction/selectinteraction.js +++ b/src/ol/interaction/selectinteraction.js @@ -320,6 +320,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) { /** * @param {ol.Feature|ol.render.Feature} feature Feature. * @param {ol.layer.Layer} layer Layer. + * @return {boolean|undefined} Continue to iterate over the features. */ function(feature, layer) { if (this.filter_(feature, layer)) { @@ -332,6 +333,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) { deselected.push(feature); this.removeFeatureLayerAssociation_(feature); } + return !this.multi_; } }, this, this.layerFilter_); var i;