baldav/frontend/js
4aiman cda91995b9 Fix: single-point track hung showSessionDetail (Delete did nothing)
Diagnosed live over the WebView DevTools protocol: a 0 km track had exactly one
usable point. The map block runs (points.length is truthy), but with a single
coordinate fitBounds is skipped, so the Leaflet map never gets a view and never
fires 'load'. With a saved route active, the overlay code then does
`await whenMapReady(map)`, which waits on that 'load' event forever — hanging the
rest of showSessionDetail, so the Delete/Recalc/Export handlers past it never
bind. No exception, just a silent stall (hence "nothing happens on Delete").

Fix: when there are < 2 coords, setView to the single point so the map loads and
whenMapReady resolves. Verified end-to-end via DevTools: the button now binds and
the 0 km track deletes.

(The prior commit moved the handlers out of the `points.length` guard, which
covers a truly 0-point track; this covers the 1-point-with-route hang.)
2026-08-16 21:06:50 +03:00
..
bmr.js Sensors, walk limits, GPS fixes, water UI, manual routes, Gridnev products, OTA router 2026-06-18 22:54:45 +03:00
db.js Route elevation preview: profile, topo/slope casing, GPXZ + fallback chain 2026-08-03 19:29:51 +03:00
gps.js Recompute tracks with an accuracy threshold (non-destructive) 2026-08-16 20:31:12 +03:00
main.js Fix: single-point track hung showSessionDetail (Delete did nothing) 2026-08-16 21:06:50 +03:00
tilecache.js Tile import, road map, orientation lock, CSP fix, tile error handling 2026-06-26 16:41:14 +03:00