fix: clic carte ferme le panel, stopPropagation sur marker, max-height panel
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user