Consider multi in add/remove/toggle select logic
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user