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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka+One&family=Fredoka:wght@400;500;600&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Fredoka+One&family=Fredoka:wght@400;500;600&display=swap" rel="stylesheet">
<script type="module" crossorigin src="/assets/index-Dx6Cc7t_.js"></script> <script type="module" crossorigin src="/assets/index-D427S7Nc.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DJNP4QZp.css"> <link rel="stylesheet" crossorigin href="/assets/index-CJwa9VxM.css">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>

View File

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

View File

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