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

@@ -122,7 +122,7 @@ _ol_pointer_PointerEventHandler_.prototype.registerSource = function(name, sourc
if (handler) {
this.eventMap_[e] = handler.bind(s);
}
}, this);
}.bind(this));
this.eventSourceList_.push(s);
}
};
@@ -178,7 +178,7 @@ _ol_pointer_PointerEventHandler_.prototype.eventHandler_ = function(inEvent) {
_ol_pointer_PointerEventHandler_.prototype.addEvents_ = function(events) {
events.forEach(function(eventName) {
_ol_events_.listen(this.element_, eventName, this.eventHandler_, this);
}, this);
}.bind(this));
};
@@ -190,7 +190,7 @@ _ol_pointer_PointerEventHandler_.prototype.addEvents_ = function(events) {
_ol_pointer_PointerEventHandler_.prototype.removeEvents_ = function(events) {
events.forEach(function(e) {
_ol_events_.unlisten(this.element_, e, this.eventHandler_, this);
}, this);
}.bind(this));
};