feat: add RotationSignal for reactive marker rotation (#14)
All checks were successful
CI / Build and Test (push) Successful in 37s
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user