fix: 메인페이지 지도 클릭(wip)
This commit is contained in:
@@ -65,6 +65,9 @@
|
||||
:imagePath="imagePath"
|
||||
:formatCityInfo="formatCityInfoText"
|
||||
:mapData="map"
|
||||
:disallowClick="false"
|
||||
:genHref="genMapCityHref"
|
||||
@city-click="onCityClick"
|
||||
/>
|
||||
</div>
|
||||
<div class="reservedCommandZone">예턴</div>
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user