Always dispatch pointermove, but calculate coordinates lazily

This commit is contained in:
Andreas Hocevar
2019-09-23 14:04:37 +02:00
parent 3992aede9d
commit a139b01f8e
2 changed files with 35 additions and 9 deletions

View File

@@ -247,11 +247,9 @@ class MapBrowserEventHandler extends EventTarget {
* @private
*/
relayEvent_(pointerEvent) {
if (this.map_.hasListener(pointerEvent.type)) {
const dragging = !!(this.down_ && this.isMoving_(pointerEvent));
this.dispatchEvent(new MapBrowserPointerEvent(
pointerEvent.type, this.map_, pointerEvent, dragging));
}
const dragging = !!(this.down_ && this.isMoving_(pointerEvent));
this.dispatchEvent(new MapBrowserPointerEvent(
pointerEvent.type, this.map_, pointerEvent, dragging));
}
/**