link Ebenen

This commit is contained in:
ISA
2025-09-12 15:18:55 +02:00
parent cc19a0a466
commit 7b881e80c2
7 changed files with 71 additions and 5 deletions

View File

@@ -23,4 +23,4 @@ NEXT_PUBLIC_USE_MOCKS=true
# z.B. http://10.10.0.13/xyz/index.aspx -> basePath in config.json auf /xyz setzen # 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 # basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.359 NEXT_PUBLIC_APP_VERSION=1.1.360

View File

@@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=false
# basePath wird jetzt in public/config.json gepflegt # basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.359 NEXT_PUBLIC_APP_VERSION=1.1.360

View File

@@ -39,6 +39,8 @@ import { setSelectedPoi } from "@/redux/slices/database/pois/selectedPoiSlice.js
import { setDisabled } from "@/redux/slices/database/polylines/polylineEventsDisabledSlice.js"; import { setDisabled } from "@/redux/slices/database/polylines/polylineEventsDisabledSlice.js";
import { setMapId, setUserId } from "@/redux/slices/urlParameterSlice"; import { setMapId, setUserId } from "@/redux/slices/urlParameterSlice";
import { selectMapLayersState, setLayerVisibility } from "@/redux/slices/mapLayersSlice"; import { selectMapLayersState, setLayerVisibility } from "@/redux/slices/mapLayersSlice";
import { setSelectedArea } from "@/redux/slices/selectedAreaSlice";
import { incrementZoomTrigger } from "@/redux/slices/zoomTriggerSlice";
import { setCurrentPoi } from "@/redux/slices/database/pois/currentPoiSlice.js"; import { setCurrentPoi } from "@/redux/slices/database/pois/currentPoiSlice.js";
import { selectGisLines } from "@/redux/slices/database/polylines/gisLinesSlice"; import { selectGisLines } from "@/redux/slices/database/polylines/gisLinesSlice";
import { selectGisLinesStatus } from "@/redux/slices/webservice/gisLinesStatusSlice"; import { selectGisLinesStatus } from "@/redux/slices/webservice/gisLinesStatusSlice";
@@ -206,6 +208,14 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
const [popupCoordinates, setPopupCoordinates] = useState(null); const [popupCoordinates, setPopupCoordinates] = useState(null);
const [popupVisible, setPopupVisible] = useState(false); const [popupVisible, setPopupVisible] = useState(false);
const [poiData, setPoiData] = useState([]); const [poiData, setPoiData] = useState([]);
// Edit mode state mirrors MapLayersControlPanel's behavior
const [editMode, setEditMode] = useState(() => {
try {
return localStorage.getItem("editMode") === "true";
} catch (_) {
return false;
}
});
const openVersionInfoModal = () => { const openVersionInfoModal = () => {
setShowVersionInfoModal(true); setShowVersionInfoModal(true);
@@ -1012,6 +1022,29 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
}, [GisSystemStatic, mapLayersVisibility, dispatch]); }, [GisSystemStatic, mapLayersVisibility, dispatch]);
//--------------------------------------------- //---------------------------------------------
//--------------------------------------------
// Expand handler (same behavior as MapLayersControlPanel expand icon)
const handleExpandClick = () => {
dispatch(setSelectedArea("Station wählen"));
dispatch(incrementZoomTrigger());
};
// Toggle edit mode (same logic as EditModeToggle component)
const hasEditRight = Array.isArray(userRights)
? userRights.includes?.(56) || userRights.some?.(r => r?.IdRight === 56)
: false;
const toggleEditMode = () => {
if (!hasEditRight) return;
const next = !editMode;
setEditMode(next);
try {
localStorage.setItem("editMode", String(next));
} catch (_) {}
if (typeof window !== "undefined") {
window.location.reload();
}
};
//-------------------------------------------- //--------------------------------------------
return ( return (
<> <>
@@ -1099,6 +1132,36 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
title={showAppInfoCard ? "Info ausblenden" : "Info einblenden"} title={showAppInfoCard ? "Info ausblenden" : "Info einblenden"}
/> />
</button> </button>
<button
onClick={handleExpandClick}
aria-label="Karte auf Standardansicht"
className="rounded-full bg-white/90 hover:bg-white shadow p-1"
title="Karte auf Standardansicht"
>
<img src="/img/expand-icon.svg" alt="Expand" className="h-8 w-8" />
</button>
<button
onClick={toggleEditMode}
aria-label={editMode ? "Bearbeitungsmodus deaktivieren" : "Bearbeitungsmodus aktivieren"}
className={`rounded-full shadow p-1 ${
hasEditRight
? "bg-white/90 hover:bg-white"
: "bg-white/60 cursor-not-allowed opacity-50"
}`}
title={
hasEditRight
? editMode
? "Bearbeitungsmodus deaktivieren"
: "Bearbeitungsmodus aktivieren"
: "Keine Bearbeitungsrechte"
}
disabled={!hasEditRight}
>
<Icon
icon={editMode ? "material-symbols:edit-off-rounded" : "material-symbols:edit-rounded"}
className="h-8 w-8 text-blue-900"
/>
</button>
</div> </div>
<CoordinatePopup isOpen={isPopupOpen} coordinates={currentCoordinates} onClose={closePopup} /> <CoordinatePopup isOpen={isPopupOpen} coordinates={currentCoordinates} onClose={closePopup} />

View File

@@ -275,6 +275,7 @@ function MapLayersControlPanel({ handlePolylineCheckboxChange }) {
</option> </option>
))} ))}
</select> </select>
{/*
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<EditModeToggle /> <EditModeToggle />
<img <img
@@ -284,6 +285,7 @@ function MapLayersControlPanel({ handlePolylineCheckboxChange }) {
onClick={handleIconClick} onClick={handleIconClick}
/> />
</div> </div>
*/}
</div> </div>
{/* Checkboxen mit Untermenüs */} {/* Checkboxen mit Untermenüs */}

View File

@@ -102,3 +102,4 @@ Station suchen
Hamburger-Menü Hamburger-Menü
- [ ] TODO: Info Karte: VersionInfoModal.js Modal soll über einem Icon 'Info' oben rechts - [ ] TODO: Info Karte: VersionInfoModal.js Modal soll über einem Icon 'Info' oben rechts
eingeblendet und ausgeblendet um mehr von der Karte zu sehen Info eingeblendet und ausgeblendet um mehr von der Karte zu sehen Info
https://www.openstreetmap.org/#map=13/51.80097/9.33495&layers=P

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "nodemap", "name": "nodemap",
"version": "1.1.359", "version": "1.1.360",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "nodemap", "name": "nodemap",
"version": "1.1.359", "version": "1.1.360",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "nodemap", "name": "nodemap",
"version": "1.1.359", "version": "1.1.360",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",