Consider multi in add/remove/toggle select logic

This commit is contained in:
Björn Harrtell
2016-02-17 13:18:06 +01:00
parent f77480ec28
commit 7822f5ce5d
+2
View File
@@ -320,6 +320,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
/** /**
* @param {ol.Feature|ol.render.Feature} feature Feature. * @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer. * @param {ol.layer.Layer} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features.
*/ */
function(feature, layer) { function(feature, layer) {
if (this.filter_(feature, layer)) { if (this.filter_(feature, layer)) {
@@ -332,6 +333,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
deselected.push(feature); deselected.push(feature);
this.removeFeatureLayerAssociation_(feature); this.removeFeatureLayerAssociation_(feature);
} }
return !this.multi_;
} }
}, this, this.layerFilter_); }, this, this.layerFilter_);
var i; var i;