fix: GMA Tooltip Kontextmenü schließen wenn versucht neu aufzurufen

This commit is contained in:
ISA
2024-12-16 13:49:43 +01:00
parent 1abe72f209
commit a00e322cbb
4 changed files with 54 additions and 101 deletions

View File

@@ -1,4 +1,7 @@
// utils/initializeMap.js
// TODO: Add a comment
//FIXME: Add a comment
//BUG: Add a comment
import L from "leaflet";
import "leaflet-contextmenu";
import "leaflet/dist/leaflet.css";
@@ -44,7 +47,7 @@ export const initializeMap = (mapRef, setMap, setOms, setMenuItemAdded, addItems
try {
if (clickedElement instanceof L.Marker || clickedElement?.options?.link) {
const link = clickedElement.options.link;
const link = "/talas5/devices/" + clickedElement.options.link;
if (link) {
console.log("Opening link in a new tab:", link);
window.open(link, "_blank");