new nav system
All checks were successful
ci/woodpecker/pr/pr Pipeline was successful

This commit is contained in:
Madison Grubb
2026-02-14 22:47:05 -05:00
parent 9261ba92bf
commit 4e51ca5509
27 changed files with 1198 additions and 688 deletions

View File

@@ -201,6 +201,7 @@ function createMap(initialCenter) {
updateMarkers()
updatePoiMarkers()
updateLiveMarkers()
nextTick(() => map.invalidateSize())
}
function updateMarkers() {
@@ -403,6 +404,8 @@ function initMapWithLocation() {
)
}
let resizeObserver = null
onMounted(async () => {
if (!import.meta.client || typeof document === 'undefined') return
const [leaflet, offline] = await Promise.all([
@@ -422,6 +425,15 @@ onMounted(async () => {
leafletRef.value = { L, offlineApi: offline }
initMapWithLocation()
document.addEventListener('click', onDocumentClick)
nextTick(() => {
if (mapRef.value) {
resizeObserver = new ResizeObserver(() => {
mapContext.value?.map?.invalidateSize()
})
resizeObserver.observe(mapRef.value)
}
})
})
function onDocumentClick(e) {
@@ -430,6 +442,10 @@ function onDocumentClick(e) {
onBeforeUnmount(() => {
document.removeEventListener('click', onDocumentClick)
if (resizeObserver && mapRef.value) {
resizeObserver.disconnect()
resizeObserver = null
}
destroyMap()
})