fix: keep Mol database layers explicit on map
This commit is contained in:
@@ -193,6 +193,8 @@ interface MapWorkspaceProps {
|
||||
viewportVectorStatus: string | null
|
||||
viewportVectorTone: 'ready' | 'pending' | 'warning' | 'error'
|
||||
fitMapDataOnChange: boolean
|
||||
mapContentMode: 'dataset' | 'analysis'
|
||||
analysisLayerAvailable: boolean
|
||||
selectedMapFeature: GeoJSON.Feature | null
|
||||
selectedFeature?: GeoJSON.Feature | null
|
||||
mapSelectionBbox: VectorSelectionBBox | null
|
||||
@@ -220,6 +222,7 @@ interface MapWorkspaceProps {
|
||||
onSetAreaLayerOpacity: (opacity: number) => void
|
||||
onSetMapLayerVisible: (visible: boolean) => void
|
||||
onSetMapLayerOpacity: (opacity: number) => void
|
||||
onSetMapContentMode: (mode: 'dataset' | 'analysis') => void
|
||||
onSelectMapFeature: (feature: GeoJSON.Feature | null) => void
|
||||
onMapViewportChange: (viewport: MapViewportState) => void
|
||||
onSetMapSelectionBbox: (bbox: VectorSelectionBBox | null) => void
|
||||
@@ -256,6 +259,8 @@ export function MapWorkspace({
|
||||
viewportVectorStatus,
|
||||
viewportVectorTone,
|
||||
fitMapDataOnChange,
|
||||
mapContentMode,
|
||||
analysisLayerAvailable,
|
||||
selectedMapFeature,
|
||||
selectedFeature = selectedMapFeature,
|
||||
mapSelectionBbox,
|
||||
@@ -283,6 +288,7 @@ export function MapWorkspace({
|
||||
onSetAreaLayerOpacity,
|
||||
onSetMapLayerVisible,
|
||||
onSetMapLayerOpacity,
|
||||
onSetMapContentMode,
|
||||
onSelectMapFeature,
|
||||
onMapViewportChange,
|
||||
onSetMapSelectionBbox,
|
||||
@@ -508,6 +514,26 @@ export function MapWorkspace({
|
||||
</div>
|
||||
) : null}
|
||||
<div className="map-toolbar">
|
||||
<div className="map-layer-mode" aria-label="Map content mode">
|
||||
<span>Map content</span>
|
||||
<div role="group" aria-label="Map content source">
|
||||
<button
|
||||
type="button"
|
||||
aria-pressed={mapContentMode === 'dataset'}
|
||||
onClick={() => onSetMapContentMode('dataset')}
|
||||
>
|
||||
Database
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-pressed={mapContentMode === 'analysis'}
|
||||
disabled={!analysisLayerAvailable}
|
||||
onClick={() => onSetMapContentMode('analysis')}
|
||||
>
|
||||
Analysis result
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<label>
|
||||
Database layer
|
||||
<select
|
||||
|
||||
Reference in New Issue
Block a user