Fix Select behavior when multi is false

This commit addresses https://github.com/openlayers/ol3/pull/3402#issuecomment-87701660.
This commit is contained in:
Éric Lemoine
2015-03-30 18:29:45 +02:00
parent 10e30d1ab5
commit 9022530bf9
2 changed files with 37 additions and 24 deletions

View File

@@ -216,8 +216,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]) {