Driving mode ("Drive": big buttons — follow, zoom, 2D/3D, night, route overview — the sidebar hidden); palettes instead of the inversion (the UI's greys onto --ui-*, MapLibre's controls too, night → Night, new ◑ Dusk); the navigated route magenta, the driven part dimmed; route progress only forward (locate near the last position first); rerouting on the server off its own GNSS (TripStore#follow), the browser's only without the shared trip; the overview map hidden while following in 3D; the topbar's items apart
This commit is contained in:
1 parent
12b4ac6725
commit
07a4d363ec
13 files changed
+520
-219
No files matched your search
@@ -123,6 +123,19 @@ export function notifyRouteChanged(route) {
|
||||
document.dispatchEvent(new CustomEvent(ROUTE_CHANGED_EVENT, { detail: route }));
|
||||
}
|
||||
|
||||
// How far along the route the position is, while the dashboard follows it
|
||||
// (km, or null once it's off it / not navigating): the route panel draws
|
||||
// the driven part dimmed and the rest as the active route.
|
||||
const ROUTE_PROGRESS_EVENT = "route-progress";
|
||||
|
||||
export function notifyRouteProgress(km) {
|
||||
document.dispatchEvent(new CustomEvent(ROUTE_PROGRESS_EVENT, { detail: km }));
|
||||
}
|
||||
|
||||
export function onRouteProgress(callback) {
|
||||
document.addEventListener(ROUTE_PROGRESS_EVENT, (event) => callback(event.detail));
|
||||
}
|
||||
|
||||
// Off the route while navigating: the route panel routes again from `from`
|
||||
// ([lon, lat]) to the points not yet reached (`passed` via points skipped).
|
||||
const REROUTE_EVENT = "route-reroute";
|
||||
|
||||
Reference in new issue
Block a user