Files
via/maplibre/maplibre.go
Ryan Hamamura b2474bf79d fix: draggable pin writeback and click-to-place event collision
Three related bugs in the maplibre reactive signal plumbing:

1. Draggable marker coordinates never updated because dragendHandlerJS
   queries for hidden inputs matching LngSignal/LatSignal IDs, but
   Element() never rendered those inputs. Add them after the marker
   data-effect divs.

2. Click-to-place marker didn't appear until moveend because Element()
   rendered a bare hidden input for each event signal, colliding with
   the user's action-bearing input (same data-bind, querySelector finds
   the bare one first). Remove the internal event inputs — the user
   provides their own via MapEvent.Input().

3. The moveend handler dispatched 'input' on ALL data-bind inputs in
   the wrapper, accidentally triggering event inputs. Add an else-return
   so only the 5 viewport signal inputs get dispatched.
2026-02-20 08:29:24 -10:00

11 KiB