Skip to content

feat(satellite): two-way bearing sync between modal and main map#736

Merged
github-actions[bot] merged 4 commits into
devfrom
feat/satellite-rotation
Jun 13, 2026
Merged

feat(satellite): two-way bearing sync between modal and main map#736
github-actions[bot] merged 4 commits into
devfrom
feat/satellite-rotation

Conversation

@msupino

@msupino msupino commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Rotating the satellite view modal map now rotates the main map and vice versa. A _syncingBearing guard prevents the set→event→set feedback loop, and the main-map rotate listener is detached on modal close. Adds window.__satModalMap test hook and asserts both sync directions.

(Orientation-on-open + the rotation dial itself already landed via #733.) Closes #735

Made with Cursor

Rotating the satellite modal map now rotates the main map and vice versa.
A _syncingBearing guard prevents the set→event→set feedback loop; the
main-map rotate listener is detached on modal close. Adds window.__satModalMap
test hook and asserts both sync directions.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot marked this pull request as draft June 13, 2026 18:41
@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployed

Open PR preview →

https://msupino.github.io/NavigationApp/branch/feat/satellite-rotation/

Commit: 5483126

The static satellite snippet in the waypoint inspector now rotates its tile
layer to match the main map's bearing (crosshair/attribution stay upright).
A one-time map rotate listener keeps a visible preview aligned live as the
dial or the satellite modal's two-way sync changes the bearing. Tiles sit in
a new .satellite-snippet-tiles layer; the 3×3 overscan hides corner gaps.

Co-authored-by: Cursor <cursoragent@cursor.com>
@msupino msupino marked this pull request as ready for review June 13, 2026 18:57
@github-actions github-actions Bot enabled auto-merge (squash) June 13, 2026 18:57
…itForFunction

The test awaited getRegistration() multiple times and only handled
active|installing, so a registration in the 'waiting' state (or a
transient null worker slot) threw 'Cannot read properties of null'
or returned null. Poll inside waitForFunction until a worker slot
(active/waiting/installing) exposes a scriptURL, then assert. Verified
stable across repeated runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
The static snippet rotated opposite to the main map. Apply rotate(+bearing)
so it matches the live (leaflet-rotate) modal map's orientation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot merged commit 13daa18 into dev Jun 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant