mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 07:40:59 +00:00
fix(journey): no zoom buttons on the journey map on touch screens
On a phone they sat under the bottom bar, and a finger zooms with a pinch anyway; devices with a mouse or trackpad keep them.
This commit is contained in:
@@ -691,7 +691,11 @@ function JourneyMap(
|
||||
ref={containerRef}
|
||||
style={{ width: '100%', height: '100%' }}
|
||||
/>
|
||||
<div style={{ position: 'absolute', bottom: 12, right: 12, zIndex: 400, display: 'flex', flexDirection: 'column', gap: 4 }}>
|
||||
{/* A finger zooms with a pinch, and on a phone these sat under the bottom bar (#3001). */}
|
||||
<div
|
||||
className="[@media(pointer:coarse)]:hidden"
|
||||
style={{ position: 'absolute', bottom: 12, right: 12, zIndex: 400, display: 'flex', flexDirection: 'column', gap: 4 }}
|
||||
>
|
||||
<button type="button" onClick={() => zoom(true)} style={zoomButtonStyle(dark)}>+</button>
|
||||
<button type="button" onClick={() => zoom(false)} style={zoomButtonStyle(dark)}>−</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user