fix: prevent marker snap-back during drag via PubSub echo #18

Merged
ryan merged 1 commits from worktree-drag-rate-limit into main 2026-02-21 02:51:40 +00:00

1 Commits

Author SHA1 Message Date
Ryan Hamamura
a6d18273e9 fix: prevent marker snap-back during drag via PubSub echo
All checks were successful
CI / Build and Test (push) Successful in 41s
CI / Build and Test (pull_request) Successful in 37s
When dragging a marker in a multi-client PubSub setup, the server echoes
position updates back to the originating client. The data-effect would
then call setLngLat with the stale echoed position, snapping the marker
back while the user had already dragged further.

Add a per-marker _dragging flag: set on dragstart, cleared after the
final dragend writeback. The signal→position effect skips setLngLat
(and rotation) while the flag is true.
2026-02-20 16:49:33 -10:00