Simplified api

This commit is contained in:
simonseyock
2016-12-07 11:14:59 +01:00
parent 8edc2be103
commit 55ec0af072
6 changed files with 18 additions and 33 deletions

View File

@@ -217,7 +217,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
// the pixel.
ol.obj.clear(this.featureLayerAssociation_);
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
/**
(/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features.
@@ -228,7 +228,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
this.addFeatureLayerAssociation_(feature, layer);
return !this.multi_;
}
}, this, {
}).bind(this), {
layerFilter: this.layerFilter_,
hitTolerance: this.hitTolerance_
});
@@ -250,7 +250,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
} else {
// Modify the currently selected feature(s).
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
/**
(/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features.
@@ -268,7 +268,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
}
return !this.multi_;
}
}, this, {
}).bind(this), {
layerFilter: this.layerFilter_,
hitTolerance: this.hitTolerance_
});

View File

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