Replace getChangeEventType() with add/removeChangeListener methods

This commit is contained in:
Andreas Hocevar
2021-06-19 14:22:23 +02:00
parent cf7213c5cb
commit 343e0ffce9
13 changed files with 49 additions and 110 deletions

View File

@@ -20,7 +20,6 @@ import {
getTopLeft,
scaleFromCenter,
} from '../extent.js';
import {getChangeEventType} from '../Object.js';
import {listen, listenOnce} from '../events.js';
import {fromExtent as polygonFromExtent} from '../geom/Polygon.js';
import {replaceNode} from '../dom.js';
@@ -348,8 +347,8 @@ class OverviewMap extends Control {
this.ovmap_.setView(newView);
}
view.addEventListener(
getChangeEventType(ViewProperty.ROTATION),
view.addChangeListener(
ViewProperty.ROTATION,
this.boundHandleRotationChanged_
);
// Sync once with the new view
@@ -362,8 +361,8 @@ class OverviewMap extends Control {
* @private
*/
unbindView_(view) {
view.removeEventListener(
getChangeEventType(ViewProperty.ROTATION),
view.removeChangeListener(
ViewProperty.ROTATION,
this.boundHandleRotationChanged_
);
}