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

@@ -6,7 +6,6 @@ import ProjUnits from '../proj/Units.js';
import {CLASS_UNSELECTABLE} from '../css.js';
import {METERS_PER_UNIT, getPointResolution} from '../proj.js';
import {assert} from '../asserts.js';
import {getChangeEventType} from '../Object.js';
/**
* @type {string}
@@ -131,10 +130,7 @@ class ScaleLine extends Control {
*/
this.renderedHTML_ = '';
this.addEventListener(
getChangeEventType(UNITS_PROP),
this.handleUnitsChanged_
);
this.addChangeListener(UNITS_PROP, this.handleUnitsChanged_);
this.setUnits(options.units || Units.METRIC);