diff --git a/hwe/index.php b/hwe/index.php index c68d238f..434e8a4b 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -274,7 +274,7 @@ if (!$otherTextInfo) {
- +
@@ -353,23 +353,23 @@ if (!$otherTextInfo) { ?>
- 방침 - 명령 - 국가 - 장수 - 도시 + + + + +
- 지도 - 동향 - 개인 - 정세 + + + +
- 전체 - 국가 - 개인 - 외교 + + + +
diff --git a/hwe/ts/main.ts b/hwe/ts/main.ts index cea2ffbd..528e1836 100644 --- a/hwe/ts/main.ts +++ b/hwe/ts/main.ts @@ -7,7 +7,9 @@ import './msg.ts'; import './map.ts'; import { exportWindow } from './util/exportWindow'; +import { scrollHardTo } from './util/scrollHardTo'; +exportWindow(scrollHardTo, 'scrollHardTo'); exportWindow($, '$'); import '../scss/main.scss'; diff --git a/hwe/ts/util/scrollHardTo.ts b/hwe/ts/util/scrollHardTo.ts new file mode 100644 index 00000000..3efa8262 --- /dev/null +++ b/hwe/ts/util/scrollHardTo.ts @@ -0,0 +1,9 @@ +export function scrollHardTo(elementId: string): void { + const element = document.getElementById(elementId); + if(!element){ + return; + } + element.scrollIntoView({ + behavior: 'auto', + }); + } \ No newline at end of file