Named exports from ol/events
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import {inherits} from '../index.js';
|
||||
import {TRUE} from '../functions.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import {listen, unlistenByKey} from '../events.js';
|
||||
import Event from '../events/Event.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import Interaction from '../interaction/Interaction.js';
|
||||
@@ -159,13 +159,13 @@ DragAndDrop.prototype.registerListeners_ = function() {
|
||||
if (map) {
|
||||
const dropArea = this.target ? this.target : map.getViewport();
|
||||
this.dropListenKeys_ = [
|
||||
_ol_events_.listen(dropArea, EventType.DROP,
|
||||
listen(dropArea, EventType.DROP,
|
||||
DragAndDrop.handleDrop_, this),
|
||||
_ol_events_.listen(dropArea, EventType.DRAGENTER,
|
||||
listen(dropArea, EventType.DRAGENTER,
|
||||
DragAndDrop.handleStop_, this),
|
||||
_ol_events_.listen(dropArea, EventType.DRAGOVER,
|
||||
listen(dropArea, EventType.DRAGOVER,
|
||||
DragAndDrop.handleStop_, this),
|
||||
_ol_events_.listen(dropArea, EventType.DROP,
|
||||
listen(dropArea, EventType.DROP,
|
||||
DragAndDrop.handleStop_, this)
|
||||
];
|
||||
}
|
||||
@@ -218,7 +218,7 @@ DragAndDrop.prototype.tryReadFeatures_ = function(format, text, options) {
|
||||
*/
|
||||
DragAndDrop.prototype.unregisterListeners_ = function() {
|
||||
if (this.dropListenKeys_) {
|
||||
this.dropListenKeys_.forEach(_ol_events_.unlistenByKey);
|
||||
this.dropListenKeys_.forEach(unlistenByKey);
|
||||
this.dropListenKeys_ = null;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user