refactor: Polyline-Sichtbarkeit auf Redux umgestellt (ersetzt Recoil)

- Sichtbarkeitsstatus für Kabelstrecken/Polylines wird jetzt zentral im Redux-Store verwaltet.
- Initialer Zustand wird aus localStorage gelesen und direkt in Redux gesetzt.
- DataSheet-Checkbox steuert Redux-Status und synchronisiert mit localStorage.
- MapComponent.js verwendet Redux-State direkt zur Steuerung von setupPolylines.
- setupPolylines.js ist jetzt komplett "dumm" und bekommt den Sichtbarkeitsstatus nur noch als Parameter.
- Konsistente Lösung für Initial-Laden, Checkbox-Wechsel und Map-Neuladen umgesetzt.
This commit is contained in:
Ismail Ali
2025-03-06 19:54:29 +01:00
parent 335b88d449
commit a837291048
9 changed files with 59 additions and 184 deletions

View File

@@ -59,7 +59,7 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
return { idLD: station.IdLD, active: station.Active };
});
console.log("🔄 Alle Linien gespeichert:", allLines);
//console.log("🔄 Alle Linien gespeichert:", allLines);
const activeStations = staticDistrictData.Points.filter((station) => station.System === systemId && station.Active === 1);