removes opt_this from ol.Collection#forEach

this commit also removes all uses of the standard thisArg of
Array#forEach.
This commit is contained in:
simonseyock
2017-12-16 13:43:46 +01:00
parent 1aa7313a7b
commit 3e82c37bed
13 changed files with 28 additions and 36 deletions

View File

@@ -313,12 +313,12 @@ _ol_interaction_Select_.prototype.setMap = function(map) {
var selectedFeatures =
this.featureOverlay_.getSource().getFeaturesCollection();
if (currentMap) {
selectedFeatures.forEach(currentMap.unskipFeature, currentMap);
selectedFeatures.forEach(currentMap.unskipFeature.bind(currentMap));
}
Interaction.prototype.setMap.call(this, map);
this.featureOverlay_.setMap(map);
if (map) {
selectedFeatures.forEach(map.skipFeature, map);
selectedFeatures.forEach(map.skipFeature.bind(map));
}
};