feat(ui): add AreaDropdown and exclusive toggle with layers panel
New AreaDropdown component for quick station selection (filters by allowed systems, ESC to close) MapComponent: toggle AreaDropdown via MapMarkerIcon; auto-hide MapLayersControlPanel when dropdown is open and vice versa fix(alarms): hasActiveAlarm now checks Statis[].Alarm for both array and object shapes fix(panel): Kabelstrecken now auto-enables TALAS (system-1) when turned on; keeps behavior to disable polylines when TALAS is unchecked; persists visibility to localStorage and emits visibilityChanged Minor: imports, state wiring, and render guards updated Affected files: MapComponent.js MapLayersControlPanel.js AreaDropdown.js (new)
This commit is contained in:
@@ -1160,7 +1160,13 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
)}
|
||||
{/* Marker-Icon (line-md) */}
|
||||
<button
|
||||
onClick={() => setShowAreaDropdown(v => !v)}
|
||||
onClick={() =>
|
||||
setShowAreaDropdown(v => {
|
||||
const next = !v;
|
||||
if (next) setShowLayersPanel(false); // Dropdown öffnen -> Panel schließen
|
||||
return next;
|
||||
})
|
||||
}
|
||||
aria-label="Marker"
|
||||
className="rounded-full bg-white/90 hover:bg-white shadow p-1"
|
||||
title="Marker"
|
||||
@@ -1211,7 +1217,13 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
</button>
|
||||
{/* Lupe: Koordinaten-Suche ein-/ausblenden */}
|
||||
<button
|
||||
onClick={() => setShowLayersPanel(v => !v)}
|
||||
onClick={() =>
|
||||
setShowLayersPanel(v => {
|
||||
const next = !v;
|
||||
if (next) setShowAreaDropdown(false); // Panel öffnen -> Dropdown schließen
|
||||
return next;
|
||||
})
|
||||
}
|
||||
aria-label={showLayersPanel ? "Layer-Panel ausblenden" : "Layer-Panel einblenden"}
|
||||
className="rounded-full bg-white/90 hover:bg-white shadow p-1"
|
||||
title={showLayersPanel ? "Layer-Panel ausblenden" : "Layer-Panel einblenden"}
|
||||
|
||||
Reference in New Issue
Block a user