fix: 메인페이지 지도 클릭(wip)
This commit is contained in:
@@ -65,6 +65,9 @@
|
|||||||
:imagePath="imagePath"
|
:imagePath="imagePath"
|
||||||
:formatCityInfo="formatCityInfoText"
|
:formatCityInfo="formatCityInfoText"
|
||||||
:mapData="map"
|
:mapData="map"
|
||||||
|
:disallowClick="false"
|
||||||
|
:genHref="genMapCityHref"
|
||||||
|
@city-click="onCityClick"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="reservedCommandZone">예턴</div>
|
<div class="reservedCommandZone">예턴</div>
|
||||||
@@ -378,6 +381,21 @@ const cityPosition = getCityPosition();
|
|||||||
const formatCityInfoText = formatCityInfo;
|
const formatCityInfoText = formatCityInfo;
|
||||||
const imagePath = window.pathConfig.gameImage;
|
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 () => {
|
watch(refreshCounter, async () => {
|
||||||
try {
|
try {
|
||||||
map.value = await SammoAPI.Global.GetMap({
|
map.value = await SammoAPI.Global.GetMap({
|
||||||
|
|||||||
Reference in New Issue
Block a user