Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(map): keep the layer switcher clear of the sidebar edge

Maurice79c460fd3863
diff --git a/client/src/components/Map/MapView.tsx b/client/src/components/Map/MapView.tsx
index 2a5fcddf3..eca314267 100644
--- a/client/src/components/Map/MapView.tsx
+++ b/client/src/components/Map/MapView.tsx
@@ -899,7 +899,10 @@ export const MapView = memo(function MapView({
onClick={cycleTrackingMode}
bottomOffset={locationButtonBottom as unknown as number}
/>}
- <div style={{ position: 'absolute', left: leftWidth + 12, bottom: switcherBottom, zIndex: 1000, pointerEvents: 'none' }}>
+ {/* 20px off the sidebar, not 12: the pill is round and frosted, so at the
+ smaller gap its shadow ran into the sidebar edge and the two read as one
+ surface. */}
+ <div style={{ position: 'absolute', left: leftWidth + 20, bottom: switcherBottom, zIndex: 1000, pointerEvents: 'none' }}>
<MapLayerSwitcher active={baseLayer} onToggle={toggleBaseLayer} />
</div>
</div>