fix: 지도 도시 민감도 문제 수정

- touchend는 touchmove와는 별개이므로 함께 처리
This commit is contained in:
Hide_D committed 2023-03-17 00:30:22 +09:00
1 parent 83c43d0261
commit 3513aae088
3 files changed
+52 -11

No files matched your search

+10 -4
View File
@@ -65,8 +65,9 @@
:isFullWidth="isFullWidth"
:href="props.genHref?.call(city, city.id)"
@click="cityClick(city, $event)"
@touchleave="pointerleave(city, $event)"
@mouseenter="mouseenter(city, $event)"
@mouseleave="mouseleave(city, $event)"
@mouseleave="pointerleave(city, $event)"
/>
</template>
<template v-else
@@ -78,8 +79,9 @@
:isFullWidth="isFullWidth"
:href="props.genHref?.call(city, city.id)"
@click="cityClick(city, $event)"
@touchleave="pointerleave(city, $event)"
@mouseenter="mouseenter(city, $event)"
@mouseleave="mouseleave(city, $event)"
@mouseleave="pointerleave(city, $event)"
/></template>
</div>
<div
@@ -484,8 +486,12 @@ function mouseenter(city: MapCityParsed, $event: MouseEvent): void {
}
}
function mouseleave(city: MapCityParsed, $event: MouseEvent): void {
if (cursorType.value == "mouse") {
function pointerleave(city: MapCityParsed, $event: MouseEvent|TouchEvent): void {
if (cursorType.value == "touch") {
activatedCity.value = undefined;
touchState.value = 0;
}
else if (cursorType.value == "mouse") {
activatedCity.value = undefined;
touchState.value = 0;
}