feat: BASE_URL in contextMenuUtil.js importiert

This commit is contained in:
ISA
2024-07-12 08:16:51 +02:00
parent 042d086a49
commit 45d366facc

View File

@@ -1,4 +1,5 @@
// contextMenuUtils.js // contextMenuUtils.js
import { BASE_URL } from "../config/urls";
export function addContextMenuToMarker(marker) { export function addContextMenuToMarker(marker) {
marker.unbindContextMenu(); // Entferne das Kontextmenü, um Duplikate zu vermeiden marker.unbindContextMenu(); // Entferne das Kontextmenü, um Duplikate zu vermeiden
@@ -21,6 +22,8 @@ export function addContextMenuToMarker(marker) {
} }
// Funktion zum Öffnen in einem neuen Tab // Funktion zum Öffnen in einem neuen Tab
export function openInNewTab(e, marker) { export function openInNewTab(e, marker) {
const baseUrl = BASE_URL;
console.log("baseUrl:", baseUrl);
if (marker && marker.options && marker.options.link) { if (marker && marker.options && marker.options.link) {
//console.log("Marker data:", baseUrl + marker.options.link); //console.log("Marker data:", baseUrl + marker.options.link);
window.open(baseUrl + marker.options.link, "_blank"); window.open(baseUrl + marker.options.link, "_blank");