Change signature of api methods

This commit is contained in:
simonseyock
2016-10-19 13:24:15 +02:00
committed by simonseyock
parent a6c768ae07
commit 80188b2044
4 changed files with 40 additions and 21 deletions

View File

@@ -200,7 +200,9 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
// pixel, or clear the selected feature(s) if there is no feature at
// the pixel.
ol.obj.clear(this.featureLayerAssociation_);
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
map.forEachFeatureAtPixel(mapBrowserEvent.pixel, {
layerFilter: this.layerFilter_
},
/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer.
@@ -212,7 +214,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
this.addFeatureLayerAssociation_(feature, layer);
return !this.multi_;
}
}, this, this.layerFilter_);
}, this);
var i;
for (i = features.getLength() - 1; i >= 0; --i) {
var feature = features.item(i);
@@ -230,7 +232,9 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
}
} else {
// Modify the currently selected feature(s).
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
map.forEachFeatureAtPixel(mapBrowserEvent.pixel, {
layerFilter: this.layerFilter_
},
/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer.
@@ -249,7 +253,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
}
return !this.multi_;
}
}, this, this.layerFilter_);
}, this);
var j;
for (j = deselected.length - 1; j >= 0; --j) {
features.remove(deselected[j]);

View File

@@ -197,7 +197,9 @@ ol.interaction.Translate.prototype.featuresAtPixel_ = function(pixel, map) {
ol.array.includes(this.features_.getArray(), feature)) {
return feature;
}
}, this, this.layerFilter_);
}, this, {
layerFilter: this.layerFilter_
});
};