fix: Leaflet contextmenu-Event angepasst (event.preventDefault() durch event.originalEvent.preventDefault() ersetzt)
- Problem: Leaflet-Events besitzen kein preventDefault(), nur deren originalEvent (natives DOM-Event). - Lösung: Zugriff auf event.originalEvent eingebaut, um Fehler beim Kontextmenü zu vermeiden. - Test: Marker-Kontextmenü öffnet Popup jetzt korrekt, ohne Runtime Error.
This commit is contained in:
@@ -9,5 +9,5 @@ DB_PORT=3306
|
|||||||
# Public Settings (Client braucht IP/Domain)
|
# Public Settings (Client braucht IP/Domain)
|
||||||
NEXT_PUBLIC_SERVER_URL="http://10.10.0.70" # oder evtl. später https://nodemap.firma.de
|
NEXT_PUBLIC_SERVER_URL="http://10.10.0.70" # oder evtl. später https://nodemap.firma.de
|
||||||
NEXT_PUBLIC_ENABLE_GEOCODER=true
|
NEXT_PUBLIC_ENABLE_GEOCODER=true
|
||||||
NEXT_PUBLIC_USE_MOCK_API=false
|
NEXT_PUBLIC_USE_MOCK_API=true
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
// /config/appVersion
|
// /config/appVersion
|
||||||
export const APP_VERSION = "1.1.10";
|
export const APP_VERSION = "1.1.11";
|
||||||
|
|||||||
@@ -107,7 +107,9 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
|
|||||||
marker.on("mouseover", () => marker.openPopup());
|
marker.on("mouseover", () => marker.openPopup());
|
||||||
marker.on("mouseout", () => marker.closePopup());
|
marker.on("mouseout", () => marker.closePopup());
|
||||||
marker.on("contextmenu", (event) => {
|
marker.on("contextmenu", (event) => {
|
||||||
event.preventDefault();
|
if (event.originalEvent?.preventDefault) {
|
||||||
|
event.originalEvent.preventDefault();
|
||||||
|
}
|
||||||
marker.openPopup();
|
marker.openPopup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user