diff --git a/src/view/largeScreen2/index.vue b/src/view/largeScreen2/index.vue index 88d9a48..c5029f7 100644 --- a/src/view/largeScreen2/index.vue +++ b/src/view/largeScreen2/index.vue @@ -360,6 +360,28 @@ pushDynamicRoute(EQUIPMENT_OVERVIEW_ROUTE_PATH) } + const handleMapInfoWindowClick = (event) => { + const btn = event.target.closest('.tech-map-info-btn') + if (!btn) return + event.preventDefault() + event.stopPropagation() + goToEquipmentOverview() + } + + let mapInfoClickBound = false + + const bindMapInfoWindowClick = () => { + if (mapInfoClickBound) return + document.addEventListener('click', handleMapInfoWindowClick) + mapInfoClickBound = true + } + + const unbindMapInfoWindowClick = () => { + if (!mapInfoClickBound) return + document.removeEventListener('click', handleMapInfoWindowClick) + mapInfoClickBound = false + } + const setRem = () => { const designWidth = 1920 const designHeight = 1080 @@ -631,6 +653,8 @@ addMarkers() } }) + + bindMapInfoWindowClick() } const addMarkers = () => { @@ -710,11 +734,13 @@