WIP: Kabelstrecken
This commit is contained in:
@@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=true
|
||||
# z.B. http://10.10.0.13/xyz/index.aspx -> basePath in config.json auf /xyz setzen
|
||||
# basePath wird jetzt in public/config.json gepflegt
|
||||
# App-Versionsnummer
|
||||
NEXT_PUBLIC_APP_VERSION=1.1.338
|
||||
NEXT_PUBLIC_APP_VERSION=1.1.339
|
||||
|
||||
@@ -25,4 +25,4 @@ NEXT_PUBLIC_USE_MOCKS=false
|
||||
# basePath wird jetzt in public/config.json gepflegt
|
||||
|
||||
# App-Versionsnummer
|
||||
NEXT_PUBLIC_APP_VERSION=1.1.338
|
||||
NEXT_PUBLIC_APP_VERSION=1.1.339
|
||||
|
||||
@@ -97,6 +97,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const countdownActive = useSelector(state => state.polylineContextMenu.countdownActive);
|
||||
const isPolylineContextMenuOpen = useSelector(state => state.polylineContextMenu.isOpen);
|
||||
const polylineVisible = useSelector(selectPolylineVisible);
|
||||
const polylineInitialized = useSelector(state => state.polylineLayerVisible.isInitialized);
|
||||
const GisSystemStatic = useSelector(selectGisSystemStatic);
|
||||
// Prüfen, ob TALAS (IdSystem 1) erlaubt ist
|
||||
const isTalasAllowed = Array.isArray(GisSystemStatic)
|
||||
@@ -456,6 +457,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
newCoords,
|
||||
tempMarker,
|
||||
polylineVisible,
|
||||
polylineInitialized,
|
||||
isTalasAllowed,
|
||||
poiLayerVisible,
|
||||
]);
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useSelector, useDispatch } from "react-redux";
|
||||
import {
|
||||
selectPolylineVisible,
|
||||
setPolylineVisible,
|
||||
initializePolylineFromLocalStorageThunk,
|
||||
} from "@/redux/slices/database/polylines/polylineLayerVisibleSlice";
|
||||
import { selectGisSystemStatic } from "@/redux/slices/webservice/gisSystemStaticSlice";
|
||||
import { selectGisStationsStaticDistrict } from "@/redux/slices/webservice/gisStationsStaticDistrictSlice";
|
||||
@@ -14,6 +15,8 @@ import { setVisible } from "@/redux/slices/database/pois/poiLayerVisibleSlice";
|
||||
import { incrementZoomTrigger } from "@/redux/slices/zoomTriggerSlice";
|
||||
|
||||
function MapLayersControlPanel() {
|
||||
// Dummy state to force re-render after checkbox click (workaround for Redux/localStorage sync)
|
||||
const [forceUpdate, setForceUpdate] = useState(0);
|
||||
const [editMode, setEditMode] = useState(false); // Zustand für editMode
|
||||
const [localStorageLoaded, setLocalStorageLoaded] = useState(false); // Tracking ob localStorage geladen wurde
|
||||
const kabelstreckenVisible = useSelector(selectPolylineVisible); // Redux State für Kabelstrecken
|
||||
@@ -41,8 +44,10 @@ function MapLayersControlPanel() {
|
||||
const handlePolylineCheckboxChange = event => {
|
||||
const checked = event.target.checked;
|
||||
dispatch(setPolylineVisible(checked));
|
||||
dispatch(setPolylineVisible(checked));
|
||||
// Synchronisiere Redux nach localStorage-Update
|
||||
setTimeout(() => {
|
||||
dispatch(initializePolylineFromLocalStorageThunk());
|
||||
setForceUpdate(f => f + 1); // Force re-render
|
||||
const event = new Event("polylineVisibilityChanged");
|
||||
window.dispatchEvent(event);
|
||||
}, 100);
|
||||
|
||||
Binary file not shown.
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "nodemap",
|
||||
"version": "1.1.338",
|
||||
"version": "1.1.339",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "nodemap",
|
||||
"version": "1.1.338",
|
||||
"version": "1.1.339",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nodemap",
|
||||
"version": "1.1.338",
|
||||
"version": "1.1.339",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
|
||||
Reference in New Issue
Block a user