fix: clic carte ferme le panel, stopPropagation sur marker, max-height panel

This commit is contained in:
Gwadaking
2026-04-09 00:35:41 -04:00
parent 3a69283983
commit 8823d33eb5
6 changed files with 9 additions and 6 deletions

View File

@@ -266,6 +266,7 @@ export default function SargassesMap({ onSpotSelect, selectedSpotId, activeStep,
onMove={e => setViewState(e.viewState)}
onMoveEnd={loadLayers}
onLoad={handleMapLoad}
onClick={() => onSpotSelect(null)}
mapStyle={mapStyle}
style={{ width: '100%', height: '100vh' }}
>
@@ -308,7 +309,7 @@ export default function SargassesMap({ onSpotSelect, selectedSpotId, activeStep,
longitude={coords.lng}
latitude={coords.lat}
anchor="center"
onClick={() => onSpotSelect(spot)}
onClick={e => { e.originalEvent.stopPropagation(); onSpotSelect(spot); }}
>
<SpotMarker level={level} scoreValue={scoreValue} scoreDist={scoreDist} isSelected={isSelected} name={spot.name} />
</Marker>

View File

@@ -4,6 +4,8 @@
left: 50%;
transform: translateX(-50%);
width: min(420px, calc(100vw - 32px));
max-height: calc(100vh - 90px);
overflow-y: auto;
background: #fffbf0;
border: 3px solid #333;
border-radius: 20px;