feat,misc: 지도 툴팁 on/off
This commit is contained in:
+4
-6
@@ -1,5 +1,3 @@
|
|||||||
@charset "UTF-8";
|
|
||||||
|
|
||||||
.world_map {
|
.world_map {
|
||||||
width: 700px;
|
width: 700px;
|
||||||
background: black;
|
background: black;
|
||||||
@@ -69,11 +67,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.map_body .map_toggle_cityname::after {
|
.map_body .map_toggle_cityname::after {
|
||||||
content: "끄기"
|
content: " 끄기"
|
||||||
}
|
}
|
||||||
|
|
||||||
.map_body .map_toggle_cityname.active::after {
|
.map_body .map_toggle_cityname.active::after {
|
||||||
content: "켜기"
|
content: " 켜기"
|
||||||
}
|
}
|
||||||
|
|
||||||
.map_body .map_toggle_single_tap {
|
.map_body .map_toggle_single_tap {
|
||||||
@@ -81,11 +79,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.map_body .map_toggle_single_tap::after {
|
.map_body .map_toggle_single_tap::after {
|
||||||
content: "끄기"
|
content: " 끄기"
|
||||||
}
|
}
|
||||||
|
|
||||||
.map_body .map_toggle_single_tap.active::after {
|
.map_body .map_toggle_single_tap.active::after {
|
||||||
content: "켜기"
|
content: " 켜기"
|
||||||
}
|
}
|
||||||
|
|
||||||
.world_map .city_tooltip {
|
.world_map .city_tooltip {
|
||||||
|
|||||||
@@ -85,18 +85,15 @@ function clicked(event: MouseEvent) {
|
|||||||
function mouseenter(event: MouseEvent) {
|
function mouseenter(event: MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
emit("mouseenter", event);
|
emit("mouseenter", event);
|
||||||
console.log("enter");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseleave(event: MouseEvent) {
|
function mouseleave(event: MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
emit("mouseleave", event);
|
emit("mouseleave", event);
|
||||||
console.log("out");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function silent(event: MouseEvent) {
|
function silent(event: MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
console.log(city.value.name);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -86,18 +86,15 @@ function clicked(event: MouseEvent) {
|
|||||||
function mouseenter(event: MouseEvent) {
|
function mouseenter(event: MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
emit("mouseenter", event);
|
emit("mouseenter", event);
|
||||||
console.log('enter');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseleave(event: MouseEvent) {
|
function mouseleave(event: MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
emit("mouseleave", event);
|
emit("mouseleave", event);
|
||||||
console.log('out');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function silent(event: MouseEvent){
|
function silent(event: MouseEvent){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
console.log(city.value.name);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
`map_theme_${mapTheme}`,
|
`map_theme_${mapTheme}`,
|
||||||
drawableMap ? '' : 'draw_required',
|
drawableMap ? '' : 'draw_required',
|
||||||
props.isDetailMap ? 'map_detail' : 'map_basic',
|
props.isDetailMap ? 'map_detail' : 'map_basic',
|
||||||
|
hideMapCityName ? 'hide_cityname' : '',
|
||||||
getMapSeasonClassName(),
|
getMapSeasonClassName(),
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
@@ -28,20 +29,24 @@
|
|||||||
<div class="map_button_stack">
|
<div class="map_button_stack">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-primary map_toggle_cityname btn-sm btn-minimum"
|
:class="['btn btn-primary map_toggle_cityname btn-sm btn-minimum', hideMapCityName ? 'active' : '']"
|
||||||
data-bs-toggle="button"
|
data-bs-toggle="button"
|
||||||
aria-pressed="false"
|
:aria-pressed="hideMapCityName"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
@click="hideMapCityName = !hideMapCityName"
|
||||||
>
|
>
|
||||||
도시명 표기</button
|
도시명 표기</button
|
||||||
><br />
|
><br />
|
||||||
<button
|
<button
|
||||||
v-if="deviceType != 'mouseOnly'"
|
:style="{
|
||||||
|
display: deviceType != 'mouseOnly' ? 'block' : 'none',
|
||||||
|
}"
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-secondary map_toggle_single_tap btn-sm btn-minimum"
|
:class="['btn btn-secondary map_toggle_double_tap btn-sm btn-minimum', toggleSingleTap ? 'active' : '']"
|
||||||
data-bs-toggle="button"
|
data-bs-toggle="button"
|
||||||
aria-pressed="false"
|
:aria-pressed="toggleSingleTap"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
@click="toggleSingleTap = !toggleSingleTap"
|
||||||
>
|
>
|
||||||
두번 탭 해 도시 이동
|
두번 탭 해 도시 이동
|
||||||
</button>
|
</button>
|
||||||
@@ -160,7 +165,7 @@ import MapCityBasic from "./MapCityBasic.vue";
|
|||||||
import MapCityDetail from "./MapCityDetail.vue";
|
import MapCityDetail from "./MapCityDetail.vue";
|
||||||
import { convertDictById } from "@/common_legacy";
|
import { convertDictById } from "@/common_legacy";
|
||||||
import { useElementSize, useMouseInElement } from "@vueuse/core";
|
import { useElementSize, useMouseInElement } from "@vueuse/core";
|
||||||
|
import { hideMapCityName, toggleSingleTap } from "@/state/mapViewer";
|
||||||
const uuid = uuidv4();
|
const uuid = uuidv4();
|
||||||
const gameConstStore = unwrap_err(
|
const gameConstStore = unwrap_err(
|
||||||
inject<Ref<GameConstStore>>("gameConstStore"),
|
inject<Ref<GameConstStore>>("gameConstStore"),
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { watch, ref } from "vue";
|
||||||
|
|
||||||
|
export const hideMapCityName = ref<boolean>(localStorage.getItem('sam.hideMapCityName') == 'yes');
|
||||||
|
watch(hideMapCityName, (value) => {
|
||||||
|
localStorage.setItem('sam.hideMapCityName', value ? 'yes' : 'no');
|
||||||
|
});
|
||||||
|
|
||||||
|
export const toggleSingleTap = ref<boolean>(localStorage.getItem('sam.toggleSingleTap') == 'yes');
|
||||||
|
watch(toggleSingleTap, (value) => {
|
||||||
|
localStorage.setItem('sam.toggleSingleTap', value ? 'yes' : 'no');
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user