Remove window prefix from event listener functions

This commit is contained in:
Guillaume Beraudo
2018-02-28 23:28:38 +01:00
parent f9a2780546
commit 6280941669

View File

@@ -507,7 +507,7 @@ PluggableMap.prototype.disposeInternal = function() {
unlisten(this.viewport_, EventType.MOUSEWHEEL,
this.handleBrowserEvent, this);
if (this.handleResize_ !== undefined) {
window.removeEventListener(EventType.RESIZE,
removeEventListener(EventType.RESIZE,
this.handleResize_, false);
this.handleResize_ = undefined;
}
@@ -1012,7 +1012,7 @@ PluggableMap.prototype.handleTargetChanged_ = function() {
this.renderer_.removeLayerRenderers();
removeNode(this.viewport_);
if (this.handleResize_ !== undefined) {
window.removeEventListener(EventType.RESIZE,
removeEventListener(EventType.RESIZE,
this.handleResize_, false);
this.handleResize_ = undefined;
}
@@ -1030,7 +1030,7 @@ PluggableMap.prototype.handleTargetChanged_ = function() {
if (!this.handleResize_) {
this.handleResize_ = this.updateSize.bind(this);
window.addEventListener(EventType.RESIZE,
addEventListener(EventType.RESIZE,
this.handleResize_, false);
}
}