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

@@ -4,7 +4,6 @@
import Control from './Control.js';
import EventType from '../pointer/EventType.js';
import {getChangeEventType} from '../Object.js';
import {
get as getProjection,
getTransformFromProjections,
@@ -69,10 +68,7 @@ class MousePosition extends Control {
target: options.target,
});
this.addEventListener(
getChangeEventType(PROJECTION),
this.handleProjectionChanged_
);
this.addChangeListener(PROJECTION, this.handleProjectionChanged_);
if (options.coordinateFormat) {
this.setCoordinateFormat(options.coordinateFormat);