feat: add RotationSignal for reactive marker rotation (#14)
All checks were successful
CI / Build and Test (push) Successful in 37s

This commit was merged in pull request #14.
This commit is contained in:
2026-02-20 21:16:40 +00:00
parent 297808d4cc
commit ae32da77df
4 changed files with 37 additions and 16 deletions

View File

@@ -313,6 +313,7 @@ type Marker struct {
Anchor string
// Rotation is clockwise degrees. Useful for directional icons (ships, vehicles).
// Ignored when RotationSignal is set.
Rotation float64
// Signal-backed position. When set, signals drive marker position reactively.
@@ -320,6 +321,9 @@ type Marker struct {
// If Draggable is true, drag updates write back to these signals.
LngSignal *via.Signal
LatSignal *via.Signal
// RotationSignal drives marker rotation reactively. When set, Rotation is ignored.
RotationSignal *via.Signal
}
// Popup describes a map popup.