Driving bar after the research: four 76 px buttons (zoom ±, 2D/3D, route overview), one Follow button bottom left shown only while the map isn't following, night and exit off the bar; research on day/night and on driving buttons (Garmin aviation/marine/zūmo, ships' ECDIS/S-Mode, Android Auto) in docs/design.adoc, its follow-ups in TODO
CI / check (push) Successful in 21s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-12-01 02:02:55 +01:00
1 parent 9b797fd48c
commit 0eb9d05cdc
5 files changed
+211 -36

No files matched your search

+7
View File
@@ -57,6 +57,13 @@ export function pauseFollow(map) {
state.timer = setTimeout(() => (state.button.hidden = true), FREE_LOOK_MS);
}
// Is the map following a position right now (a follow step lately, not
// paused by hand)? For the driving bar's recenter button.
export function isFollowing(map) {
const state = freeLookState(map);
return Date.now() - state.followedAt <= FOLLOWING_MS && Date.now() >= state.until;
}
export function resumeFollow(map) {
const state = freeLookState(map);
state.until = 0;