From 328ca82242ec34268baa7b726271ae769015d568 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 19 Apr 2022 02:23:33 +0900 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=ED=84=B0=EC=B9=98=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=B0=20=ED=99=95=EC=9D=B8=EC=9A=A9=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 11 +++++++++++ package.json | 1 + 2 files changed, 12 insertions(+) diff --git a/package-lock.json b/package-lock.json index a519dc2e..54ee0b53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,7 @@ "css-loader": "^6.7.1", "cssnano": "^5.1.3", "date-fns": "^2.28.0", + "detect-it": "^4.0.1", "downloadjs": "^1.4.7", "esbuild-loader": "^2.18.0", "eslint": "^8.11.0", @@ -4248,6 +4249,11 @@ "node": ">= 0.4" } }, + "node_modules/detect-it": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/detect-it/-/detect-it-4.0.1.tgz", + "integrity": "sha512-dg5YBTJYvogK1+dA2mBUDKzOWfYZtHVba89SyZUhc4+e3i2tzgjANFg5lDRCd3UOtRcw00vUTMK8LELcMdicug==" + }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -13664,6 +13670,11 @@ "object-keys": "^1.0.12" } }, + "detect-it": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/detect-it/-/detect-it-4.0.1.tgz", + "integrity": "sha512-dg5YBTJYvogK1+dA2mBUDKzOWfYZtHVba89SyZUhc4+e3i2tzgjANFg5lDRCd3UOtRcw00vUTMK8LELcMdicug==" + }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", diff --git a/package.json b/package.json index 4bfd6640..b2ac1b87 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "css-loader": "^6.7.1", "cssnano": "^5.1.3", "date-fns": "^2.28.0", + "detect-it": "^4.0.1", "downloadjs": "^1.4.7", "esbuild-loader": "^2.18.0", "eslint": "^8.11.0", -- 2.54.0 From 132cd8fe9f17656cf1636d2ca056077a59ffcbce Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 19 Apr 2022 02:44:50 +0900 Subject: [PATCH 02/10] =?UTF-8?q?feat(wip):=20=EC=88=9C=EC=88=98=20vue3?= =?UTF-8?q?=EB=A1=9C=20=EC=9E=91=EC=84=B1=ED=95=98=EB=8A=94=20=EC=A7=80?= =?UTF-8?q?=EB=8F=84=20=EB=AA=A8=EB=93=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/components/MapCityBasic.vue | 75 +++ hwe/ts/components/MapCityDetail.vue | 76 +++ hwe/ts/components/StaticMapTemplate.vue | 621 ++++++++++++++++++++++++ 3 files changed, 772 insertions(+) create mode 100644 hwe/ts/components/MapCityBasic.vue create mode 100644 hwe/ts/components/MapCityDetail.vue create mode 100644 hwe/ts/components/StaticMapTemplate.vue diff --git a/hwe/ts/components/MapCityBasic.vue b/hwe/ts/components/MapCityBasic.vue new file mode 100644 index 00000000..7a14910a --- /dev/null +++ b/hwe/ts/components/MapCityBasic.vue @@ -0,0 +1,75 @@ + + + diff --git a/hwe/ts/components/MapCityDetail.vue b/hwe/ts/components/MapCityDetail.vue new file mode 100644 index 00000000..0aab9193 --- /dev/null +++ b/hwe/ts/components/MapCityDetail.vue @@ -0,0 +1,76 @@ + + + diff --git a/hwe/ts/components/StaticMapTemplate.vue b/hwe/ts/components/StaticMapTemplate.vue new file mode 100644 index 00000000..99faa522 --- /dev/null +++ b/hwe/ts/components/StaticMapTemplate.vue @@ -0,0 +1,621 @@ + + + + + + -- 2.54.0 From d1af95fd3c8137759d3efa3b2c22f7bba90eae30 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 19 Apr 2022 03:31:48 +0900 Subject: [PATCH 03/10] =?UTF-8?q?fix(wip):=20=EC=9B=90=EB=9E=98=EC=9D=98?= =?UTF-8?q?=20=EC=A7=80=EB=8F=84=EC=99=80=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=EC=9D=B4=20=EB=8B=A4=EB=A5=B8=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20-=20line-height,=20font-size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/components/MapCityBasic.vue | 9 +++++++++ hwe/ts/components/MapCityDetail.vue | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/hwe/ts/components/MapCityBasic.vue b/hwe/ts/components/MapCityBasic.vue index 7a14910a..3004b62a 100644 --- a/hwe/ts/components/MapCityBasic.vue +++ b/hwe/ts/components/MapCityBasic.vue @@ -73,3 +73,12 @@ function clicked(event: MouseEvent) { emit("click", event); } + + diff --git a/hwe/ts/components/MapCityDetail.vue b/hwe/ts/components/MapCityDetail.vue index 0aab9193..470eedec 100644 --- a/hwe/ts/components/MapCityDetail.vue +++ b/hwe/ts/components/MapCityDetail.vue @@ -74,3 +74,13 @@ function clicked(event: MouseEvent) { emit("click", event); } + + -- 2.54.0 From ce8d1cbeb2a3cb1dc12c6eefeed7ccedfa168960 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 19 Apr 2022 03:33:17 +0900 Subject: [PATCH 04/10] =?UTF-8?q?dep:=20=ED=8E=B8=EC=9D=B4=EB=A5=BC=20?= =?UTF-8?q?=EC=9C=84=ED=95=B4=20vueuse=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 113 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 114 insertions(+) diff --git a/package-lock.json b/package-lock.json index 54ee0b53..ffa99a27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "@typescript-eslint/parser": "^5.14.0", "@vue/compiler-sfc": "^3.2.31", "@vue/eslint-config-typescript": "^10.0.0", + "@vueuse/core": "^8.2.6", "ag-grid-community": "^27.1.0", "ag-grid-vue3": "^27.1.0", "async-validator": "^4.0.7", @@ -2861,6 +2862,87 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.31.tgz", "integrity": "sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==" }, + "node_modules/@vueuse/core": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.2.6.tgz", + "integrity": "sha512-fzlpM3B5oVe+UhCT1mXlhG1Zxdq2lq1Z2AvddSB8+RxrsSFzII7DKfsQEz8Vop7Lzc++4m8drTNbhPovYoFqHw==", + "dependencies": { + "@vueuse/metadata": "8.2.6", + "@vueuse/shared": "8.2.6", + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.1.0", + "vue": "^2.6.0 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@vueuse/core/node_modules/@vueuse/shared": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.2.6.tgz", + "integrity": "sha512-J/W4CMfdL8TahELuSOgtfVO4eQXTjhigp7dVWIBsLUVFCeY9d49gvHUcQN3y5xYLZ6iNP57TjTQjMMT/zhklkw==", + "dependencies": { + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.1.0", + "vue": "^2.6.0 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.12.5.tgz", + "integrity": "sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.2.6.tgz", + "integrity": "sha512-OBKtafCt+4RcEJlYDCjp1vl65pBCL2g4TmipEtdZ8/qphKlW6nakJbkY7XRN5grPmjqU99/ahJGtyGk5NHS2hw==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -12641,6 +12723,37 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.31.tgz", "integrity": "sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==" }, + "@vueuse/core": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.2.6.tgz", + "integrity": "sha512-fzlpM3B5oVe+UhCT1mXlhG1Zxdq2lq1Z2AvddSB8+RxrsSFzII7DKfsQEz8Vop7Lzc++4m8drTNbhPovYoFqHw==", + "requires": { + "@vueuse/metadata": "8.2.6", + "@vueuse/shared": "8.2.6", + "vue-demi": "*" + }, + "dependencies": { + "@vueuse/shared": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.2.6.tgz", + "integrity": "sha512-J/W4CMfdL8TahELuSOgtfVO4eQXTjhigp7dVWIBsLUVFCeY9d49gvHUcQN3y5xYLZ6iNP57TjTQjMMT/zhklkw==", + "requires": { + "vue-demi": "*" + } + }, + "vue-demi": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.12.5.tgz", + "integrity": "sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==", + "requires": {} + } + } + }, + "@vueuse/metadata": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.2.6.tgz", + "integrity": "sha512-OBKtafCt+4RcEJlYDCjp1vl65pBCL2g4TmipEtdZ8/qphKlW6nakJbkY7XRN5grPmjqU99/ahJGtyGk5NHS2hw==" + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", diff --git a/package.json b/package.json index b2ac1b87..0dcb29d7 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "@typescript-eslint/parser": "^5.14.0", "@vue/compiler-sfc": "^3.2.31", "@vue/eslint-config-typescript": "^10.0.0", + "@vueuse/core": "^8.2.6", "ag-grid-community": "^27.1.0", "ag-grid-vue3": "^27.1.0", "async-validator": "^4.0.7", -- 2.54.0 From 6d8151df5f3befbe8049a7f0eb23ac529ffa9cc8 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 20 Apr 2022 00:17:31 +0900 Subject: [PATCH 05/10] =?UTF-8?q?feat(wip):=20=EC=A7=80=EB=8F=84=20?= =?UTF-8?q?=ED=88=B4=ED=8C=81=20=EA=B8=B0=EB=8A=A5=20=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/components/MapCityBasic.vue | 26 +++++++++++++++++ hwe/ts/components/MapCityDetail.vue | 28 ++++++++++++++++++- hwe/ts/components/StaticMapTemplate.vue | 37 +++++++++++++++++++++---- 3 files changed, 85 insertions(+), 6 deletions(-) diff --git a/hwe/ts/components/MapCityBasic.vue b/hwe/ts/components/MapCityBasic.vue index 3004b62a..399d9caf 100644 --- a/hwe/ts/components/MapCityBasic.vue +++ b/hwe/ts/components/MapCityBasic.vue @@ -5,6 +5,8 @@ left: `${city.x - 20}px`, top: `${city.y - 15}px`, }" + @mouseenter="silent" + @mouseleave="silent" >
(); const props = defineProps({ city: { @@ -72,6 +81,23 @@ function getCityState(): string { function clicked(event: MouseEvent) { emit("click", event); } + +function mouseenter(event: MouseEvent) { + event.stopPropagation(); + emit("mouseenter", event); + console.log("enter"); +} + +function mouseleave(event: MouseEvent) { + event.stopPropagation(); + emit("mouseleave", event); + console.log("out"); +} + +function silent(event: MouseEvent) { + event.stopPropagation(); + console.log(city.value.name); +} diff --git a/hwe/ts/components/StaticMapTemplate.vue b/hwe/ts/components/StaticMapTemplate.vue index eeb86db5..f50b183a 100644 --- a/hwe/ts/components/StaticMapTemplate.vue +++ b/hwe/ts/components/StaticMapTemplate.vue @@ -7,6 +7,7 @@ drawableMap ? '' : 'draw_required', props.isDetailMap ? 'map_detail' : 'map_basic', hideMapCityName ? 'hide_cityname' : '', + isFullWidth ? 'full_width_map' : 'small_width_map', getMapSeasonClassName(), ]" > @@ -59,6 +60,7 @@ :city="city" :image-path="imagePath" :is-my-city="city.id === drawableMap.myCity" + :isFullWidth="isFullWidth" @click="cityClick(city, $event)" @mouseenter="mouseenter(city, $event)" @mouseleave="mouseleave(city, $event)" @@ -70,6 +72,7 @@ :key="city.id" :city="city" :is-my-city="city.id === drawableMap.myCity" + :isFullWidth="isFullWidth" @click="cityClick(city, $event)" @mouseenter="mouseenter(city, $event)" @mouseleave="mouseleave(city, $event)" @@ -82,7 +85,7 @@ display: isOutside || !activatedCity ? 'none' : 'block', position: 'absolute', left: `${(() => { - if (cursorX + tooltipWidth + 10 > 700) { + if (cursorX + tooltipWidth + 10 > (isFullWidth ? 700 : 500)) { return cursorX - tooltipWidth - 5; } return cursorX + 10; @@ -148,7 +151,7 @@ export type CityPositionMap = { }; - - + \ No newline at end of file -- 2.54.0 From 6bee1c144048fb27b99f845e7f86ca35da840993 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 20 Apr 2022 03:21:04 +0900 Subject: [PATCH 10/10] =?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 + -- 2.54.0