Merge pull request #3453 from bjornharrtell/set-multi

Consider multi in add/remove/toggle select logic
This commit is contained in:
Andreas Hocevar
2016-02-22 09:49:00 +01:00
2 changed files with 64 additions and 1 deletions

View File

@@ -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;