From f69e6dc76fb0d40ea0d95ddba94752e163ce337e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D1=81=D0=B8=D0=BD=D0=B5=D1=87=D0=BA=D0=B0=20=E2=99=A1?= <63897347+ktnk-dev@users.noreply.github.com> Date: Wed, 9 Sep 2026 17:20:01 +0000 Subject: [PATCH] store local navigator pathfinder manifest --- .gitignore | 3 ++- web/map/js/map.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f6aa8f5..028d7de 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,9 @@ timetables/*.json .VSCodeCounter .timetracker web/analytics/data.json +web/map/data/navigator.json DEBUG schedule_client.py config.py .env -.venv \ No newline at end of file +.venv diff --git a/web/map/js/map.js b/web/map/js/map.js index 5a903ab..0b1b125 100644 --- a/web/map/js/map.js +++ b/web/map/js/map.js @@ -309,7 +309,11 @@ function manifestPoints(floorId) { if (!manifest) return [] const floors = manifest.floors || manifest const value = floors?.[String(floorId)] || floors?.[Number(floorId)] - return Array.isArray(value) ? value : (Array.isArray(value?.points) ? value.points : []) + if (Array.isArray(value)) return value + if (Array.isArray(value?.points)) return value.points + if (Array.isArray(value?.positions)) return value.positions + if (Array.isArray(value?.pathfinder_data?.positions)) return value.pathfinder_data.positions + return [] } function segmentFloor(segment) {