Merge pull request #3422 from elemoine/multi-filter

Fix Select behavior when multi is false
This commit is contained in:
Éric Lemoine
2015-03-31 14:16:32 +02:00
2 changed files with 37 additions and 24 deletions

View File

@@ -217,8 +217,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
function(feature, layer) {
if (this.filter_(feature, layer)) {
selected.push(feature);
return !this.multi_;
}
return !this.multi_;
}, this, this.layerFilter_);
if (selected.length > 0 && features.getLength() == 1 &&
features.item(0) == selected[0]) {