mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
drop hero / inline tab-bar on mobile journey + gallery, eager map tiles
- mobile: journey and gallery views both run as chromeless overlays now. The hero card, backlink, stats row and inline tab-bar are hidden; the floating top bar (back, Journey/Gallery toggle, settings) handles branding for both views, and the gallery content gets a top padding that matches the bar so nothing is occluded. - the journey-title pill below the tab-toggle is removed — the toggle itself is enough; the pill just duplicated information. - JourneyMap tile layer: set updateWhenIdle:false and keepBuffer:4. Leaflet defaults to "wait for pan to settle before loading tiles" on mobile, which showed as a visible tile-lag when switching timeline cards (flyTo moves the map). Eager updates plus a wider off-screen ring keep the neighbouring tiles hot.
This commit is contained in:
@@ -183,6 +183,12 @@ const JourneyMap = forwardRef<JourneyMapHandle, Props>(function JourneyMap(
|
||||
maxZoom: 18,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
||||
referrerPolicy: 'strict-origin-when-cross-origin',
|
||||
// Leaflet defaults updateWhenIdle:true on mobile (waits for pan to settle
|
||||
// before loading tiles). On the journey mobile combined view we flyTo
|
||||
// constantly when switching cards, so tiles lag visibly — force eager
|
||||
// updates and keep a larger ring of off-screen tiles ready.
|
||||
updateWhenIdle: false,
|
||||
keepBuffer: 4,
|
||||
} as any).addTo(map)
|
||||
|
||||
const items = buildMarkerItems(entries)
|
||||
|
||||
Reference in New Issue
Block a user