Replace getChangeEventType() with add/removeChangeListener methods
This commit is contained in:
@@ -29,7 +29,6 @@ import {
|
||||
} from '../extent.js';
|
||||
import {createEditingStyle} from '../style/Style.js';
|
||||
import {fromUserCoordinate, getUserProjection} from '../proj.js';
|
||||
import {getChangeEventType} from '../Object.js';
|
||||
import {squaredDistance as squaredCoordinateDistance} from '../coordinate.js';
|
||||
|
||||
/**
|
||||
@@ -477,10 +476,7 @@ class Draw extends PointerInteraction {
|
||||
: shiftKeyOnly;
|
||||
}
|
||||
|
||||
this.addEventListener(
|
||||
getChangeEventType(InteractionProperty.ACTIVE),
|
||||
this.updateState_
|
||||
);
|
||||
this.addChangeListener(InteractionProperty.ACTIVE, this.updateState_);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,6 @@ import InteractionProperty from './Property.js';
|
||||
import PointerInteraction from './Pointer.js';
|
||||
import {TRUE} from '../functions.js';
|
||||
import {always} from '../events/condition.js';
|
||||
import {getChangeEventType} from '../Object.js';
|
||||
import {includes} from '../array.js';
|
||||
|
||||
/**
|
||||
@@ -192,8 +191,8 @@ class Translate extends PointerInteraction {
|
||||
*/
|
||||
this.lastFeature_ = null;
|
||||
|
||||
this.addEventListener(
|
||||
getChangeEventType(InteractionProperty.ACTIVE),
|
||||
this.addChangeListener(
|
||||
InteractionProperty.ACTIVE,
|
||||
this.handleActiveChanged_
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user