diff --git a/src/interaction/MovablePoint.tsx b/src/interaction/MovablePoint.tsx index 2b77c526..c4e2fa76 100644 --- a/src/interaction/MovablePoint.tsx +++ b/src/interaction/MovablePoint.tsx @@ -45,9 +45,9 @@ export const MovablePoint: React.VFC = ({ const pickup = React.useRef([0, 0]) - const bind = useDrag(({ event, down, movement: pixelMovement, first }) => { + const bind = useDrag(({ event, last, movement: pixelMovement, first }) => { event?.stopPropagation() - setDragging(down) + setDragging(!last) if (first) pickup.current = vec.transform(point, transform) if (vec.mag(pixelMovement) === 0) return