From a1e33f650e55037123040c2b5cbbe8722f684de9 Mon Sep 17 00:00:00 2001 From: ISA Date: Fri, 14 Mar 2025 14:18:29 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Kontextmen=C3=BC=20f=C3=BCr=20St=C3=BCt?= =?UTF-8?q?zpunkte=20nur=20im=20Edit-Mode=20anzeigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/appVersion.js | 2 +- utils/polylines/setupPolylines.js | 32 +++++++++++-------------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/config/appVersion.js b/config/appVersion.js index 03182240b..ca03db822 100644 --- a/config/appVersion.js +++ b/config/appVersion.js @@ -1,2 +1,2 @@ // /config/appVersion -export const APP_VERSION = "1.1.57"; +export const APP_VERSION = "1.1.58"; diff --git a/utils/polylines/setupPolylines.js b/utils/polylines/setupPolylines.js index cc310835b..778dfdf69 100644 --- a/utils/polylines/setupPolylines.js +++ b/utils/polylines/setupPolylines.js @@ -138,13 +138,13 @@ export const setupPolylines = (map, linePositions, lineColors, tooltipContents, }); marker.on("mouseover", function () { - this.bindContextMenu({ - contextmenuItems: [ - { - text: "Stützpunkt entfernen", - icon: "/img/icons/gisLines/remove-support-point.svg", - callback: () => { - if (editMode) { + if (editMode) { + this.bindContextMenu({ + contextmenuItems: [ + { + text: "Stützpunkt entfernen", + icon: "/img/icons/gisLines/remove-support-point.svg", + callback: () => { const newCoords = marker.getLatLng(); const newCoordinates = [...lineData.coordinates]; newCoordinates[index] = [newCoords.lat, newCoords.lng]; @@ -152,21 +152,11 @@ export const setupPolylines = (map, linePositions, lineColors, tooltipContents, removePOI(marker, lineData, currentZoom, currentCenter); polylines[lineIndex].remove(); lineData.coordinates = newCoordinates; - } else { - toast.error("Benutzer hat keine Berechtigung zum Bearbeiten.", { - position: "top-center", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - }); - } + }, }, - }, - ], - }); + ], + }); + } }); marker.on("mouseout", function () {