From f4e703b3c8b3c56876e11918e537b2592d34b42b Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Fri, 2 Aug 2024 20:10:34 +0200 Subject: [PATCH] tested if this code-change lowers the complexity for tsc to an acceptable level --- webclient/app/components/DetailsInteractiveMap.vue | 3 ++- webclient/app/components/IndoorMap.vue | 4 ++-- webclient/app/pages/next.client.vue | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/webclient/app/components/DetailsInteractiveMap.vue b/webclient/app/components/DetailsInteractiveMap.vue index 94afeb266..1843e9ecf 100644 --- a/webclient/app/components/DetailsInteractiveMap.vue +++ b/webclient/app/components/DetailsInteractiveMap.vue @@ -34,7 +34,8 @@ function loadInteractiveMap() { const coords = props.data.coords; if (map.value !== undefined) { // @ts-expect-error somehow this is too deep for typescript - marker.value.setLngLat([coords.lon, coords.lat]).addTo(map.value as Map); + marker.value.setLngLat([coords.lon, coords.lat]); + marker.value.addTo(map.value as Map); } const overlays = props.data.maps?.overlays; diff --git a/webclient/app/components/IndoorMap.vue b/webclient/app/components/IndoorMap.vue index 5f8a881fa..2b4efd495 100644 --- a/webclient/app/components/IndoorMap.vue +++ b/webclient/app/components/IndoorMap.vue @@ -40,8 +40,8 @@ async function loadInteractiveMap() { marker.value = new Marker({ element: createMarker() }); const coords = props.data.coords; if (map.value !== undefined) { - // @ts-expect-error somehow this is too deep for typescript - marker.value.setLngLat([coords.lon, coords.lat]).addTo(map.value as MaplibreMapWithIndoor); + marker.value.setLngLat([coords.lon, coords.lat]); + marker.value.addTo(map.value as MaplibreMapWithIndoor); } const defaultZooms: { [index: string]: number | undefined } = { diff --git a/webclient/app/pages/next.client.vue b/webclient/app/pages/next.client.vue index 719cab098..56d25d451 100644 --- a/webclient/app/pages/next.client.vue +++ b/webclient/app/pages/next.client.vue @@ -16,9 +16,9 @@ const { data } = useFetch(url, {