From 6bee1c144048fb27b99f845e7f86ca35da840993 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 20 Apr 2022 03:21:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=83=88=20=EC=A7=80=EB=8F=84=20?= =?UTF-8?q?=EB=AA=A8=EB=93=88=20=EB=A7=88=EB=AC=B4=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/scss/map.scss | 8 +++--- hwe/ts/components/MapCityBasic.vue | 6 ++++- .../{StaticMapTemplate.vue => MapViewer.vue} | 27 +++++-------------- 3 files changed, 16 insertions(+), 25 deletions(-) rename hwe/ts/components/{StaticMapTemplate.vue => MapViewer.vue} (94%) diff --git a/hwe/scss/map.scss b/hwe/scss/map.scss index 7bb08f96..26d500ba 100644 --- a/hwe/scss/map.scss +++ b/hwe/scss/map.scss @@ -642,10 +642,10 @@ $smV: calc(500 / 700); .city_state { position: absolute; - width: 10px; - height: 10px; - top: -2px; - left: -4px; + width: 8px; + height: 8px; + top: -3px; + left: -5px; background-color: white; } diff --git a/hwe/ts/components/MapCityBasic.vue b/hwe/ts/components/MapCityBasic.vue index 21a192e0..e7182383 100644 --- a/hwe/ts/components/MapCityBasic.vue +++ b/hwe/ts/components/MapCityBasic.vue @@ -80,11 +80,15 @@ watch( left: `${x - 20}px`, top: `${y - 15}px`, }; + } else { + cityPos.value = { + left: `${(x * 5) / 7 - 20}px`, + top: `${(y * 5) / 7 - 18}px`, + }; } }, { immediate: true } ); - function getCityState(): string { const state = city.value.state; if (state < 10) { diff --git a/hwe/ts/components/StaticMapTemplate.vue b/hwe/ts/components/MapViewer.vue similarity index 94% rename from hwe/ts/components/StaticMapTemplate.vue rename to hwe/ts/components/MapViewer.vue index 75d68b0b..c75802dc 100644 --- a/hwe/ts/components/StaticMapTemplate.vue +++ b/hwe/ts/components/MapViewer.vue @@ -61,6 +61,7 @@ :image-path="imagePath" :is-my-city="city.id === drawableMap.myCity" :isFullWidth="isFullWidth" + :href="props.genHref?.call(city, city.id)" @click="cityClick(city, $event)" @mouseenter="mouseenter(city, $event)" @mouseleave="mouseleave(city, $event)" @@ -73,6 +74,7 @@ :city="city" :is-my-city="city.id === drawableMap.myCity" :isFullWidth="isFullWidth" + :href="props.genHref?.call(city, city.id)" @click="cityClick(city, $event)" @mouseenter="mouseenter(city, $event)" @mouseleave="mouseleave(city, $event)" @@ -152,7 +154,6 @@ export type CityPositionMap = { \ No newline at end of file +