diff --git a/hwe/ts/PageFront.vue b/hwe/ts/PageFront.vue index 020e1109..e96b7711 100644 --- a/hwe/ts/PageFront.vue +++ b/hwe/ts/PageFront.vue @@ -65,6 +65,9 @@ :imagePath="imagePath" :formatCityInfo="formatCityInfoText" :mapData="map" + :disallowClick="false" + :genHref="genMapCityHref" + @city-click="onCityClick" />
예턴
@@ -378,6 +381,21 @@ const cityPosition = getCityPosition(); const formatCityInfoText = formatCityInfo; const imagePath = window.pathConfig.gameImage; +function genMapCityHref(cityID: number){ + return `b_currentCity.php?citylist=${cityID}`; +} + +function onCityClick(city: MapCityParsed, $event: MouseEvent | TouchEvent): void { + if (city.id === 0) { + return; + } + if ($event.ctrlKey) { + window.open(genMapCityHref(city.id), "_blank"); + return; + } + window.location.href = genMapCityHref(city.id); +} + watch(refreshCounter, async () => { try { map.value = await SammoAPI.Global.GetMap({