Only create pointermove when someone listens
This commit is contained in:
@@ -270,9 +270,11 @@ class MapBrowserEventHandler extends EventTarget {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
relayEvent_(pointerEvent) {
|
relayEvent_(pointerEvent) {
|
||||||
const dragging = !!(this.down_ && this.isMoving_(pointerEvent));
|
if (this.map_.hasListener(pointerEvent.type)) {
|
||||||
this.dispatchEvent(new MapBrowserPointerEvent(
|
const dragging = !!(this.down_ && this.isMoving_(pointerEvent));
|
||||||
pointerEvent.type, this.map_, pointerEvent, dragging));
|
this.dispatchEvent(new MapBrowserPointerEvent(
|
||||||
|
pointerEvent.type, this.map_, pointerEvent, dragging));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user