diff --git a/src/components/map/MapInteraction.js b/src/components/map/MapInteraction.js index b750f6d..a4c22ae 100644 --- a/src/components/map/MapInteraction.js +++ b/src/components/map/MapInteraction.js @@ -91,14 +91,14 @@ function MapInteraction({ onPinchEnd: () => { onSelectedToolChange(previousSelectedToolRef.current); }, - onDrag: ({ first, last }) => { - if (first) { - interactionEmitter.emit("dragStart"); - } else if (last) { - interactionEmitter.emit("dragEnd"); - } else { - interactionEmitter.emit("drag"); - } + onDragStart: () => { + interactionEmitter.emit("dragStart"); + }, + onDrag: () => { + interactionEmitter.emit("drag"); + }, + onDragEnd: () => { + interactionEmitter.emit("dragEnd"); }, } );