fix: 지도 렌더러에서 tooltip width가 덜 변경되도록 수정

This commit is contained in:
2022-04-27 23:04:22 +09:00
parent 11b7b57343
commit 86bbccb7f9
+8 -1
View File
@@ -188,7 +188,14 @@ const gameConstStore = unwrap_err(
const tooltipDom = ref<ComponentPublicInstance<HTMLDivElement>>();
const map_area = ref<ComponentPublicInstance<HTMLDivElement>>();
const { elementX: cursorX, elementY: cursorY, isOutside } = useMouseInElement(map_area);
const { width: tooltipWidth } = useElementSize(tooltipDom);
const tooltipWidth = ref(0);
const { width: tooltipCurrWidth } = useElementSize(tooltipDom);
watch(tooltipCurrWidth, (newWidth)=>{
if(newWidth == 0) return;
tooltipWidth.value = newWidth;
}, {immediate: true});
const { sourceType: cursorType } = useMouse();
const emit = defineEmits<{
(event: "city-click", city: MapCityParsed, e: MouseEvent | TouchEvent): void;