Dashboard: altitude (gnss.alt, the terrain's while simulating), the car tilted by the terrain's slope while simulating; free look while following (the map moved by hand pauses the follow, "Back to the position" or 15 s resumes it); overlays and shown library files remembered per device (localStorage), back after a reload once the offline checks are in
CI / check (push) Successful in 24s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-12-01 00:15:08 +01:00
1 parent 8c999919b8
commit 12b4ac6725
9 files changed
+199 -19

No files matched your search

+17
View File
@@ -37,6 +37,7 @@ const BADGE_IMAGE_PREFIX = "badge-"; // one registered image per distinct badge
// folders, as opposed to an OS file drag (type "Files") for uploading a new
// one — both land on the same drop targets, told apart by this.
const MOVE_MIME = "application/x-gpx-path";
const GPX_VISIBLE_KEY = "gpxVisible";
const FOLDER_DRAG_PREFIX = "folder:"; // a dragged folder's MOVE_MIME payload, vs. a node key
// A sidebar icon that opens a side panel for uploading GPX files (via
@@ -601,7 +602,23 @@ export class GpxPanelControl {
if (feature) this._openPointPopup(path, feature, [lng, lat]);
}
// The shown files, per device (localStorage) — back after a reload by restore().
_saveVisible() {
try { localStorage.setItem(GPX_VISIBLE_KEY, JSON.stringify([...this._visible])); } catch { /* private window: not kept */ }
}
async restore() {
let paths = [];
try { paths = JSON.parse(localStorage.getItem(GPX_VISIBLE_KEY)) || []; } catch { /* nothing kept */ }
await Promise.all(paths.map((path) => this.show(path)));
}
async _toggleFile(path, visible, checkbox) {
await this._toggleFileOnly(path, visible, checkbox);
this._saveVisible();
}
async _toggleFileOnly(path, visible, checkbox) {
if (visible) {
this._visible.add(path);
const ok = await this._addLayers(path);