aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ParksTable.astro
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-06 22:49:51 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-06 22:49:51 +0900
commitf167d302249473cb6d643a3282559fbb10bada8c (patch)
treee20bb7e034c8e88eb738481e42b9a486a72636a3 /src/components/ParksTable.astro
parent5dfc584c9dcb89d4c00300b261107aa08c77e2e2 (diff)
parks: 地図の名前表示と表スクロール、選択バーを調整
公共施設の名前をズーム15から表示し、切替時のみ処理するようにした。表は枠内で該当行を先頭にスクロール。選択バーのリンクを「Gマップ」「経路」にし、一覧で見るを削除。全公園の点滅、枠線の細線化、閉じるボタンの折りたたみ、挿入アニメーションを調整。
Diffstat (limited to 'src/components/ParksTable.astro')
-rw-r--r--src/components/ParksTable.astro4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/ParksTable.astro b/src/components/ParksTable.astro
index 2141eac..4918b2c 100644
--- a/src/components/ParksTable.astro
+++ b/src/components/ParksTable.astro
@@ -779,9 +779,11 @@ function isUnconfirmed(p: Park): boolean {
const scrollRowIntoView = (row: HTMLElement) => {
const scroller = root.querySelector<HTMLElement>(".parks-scroll");
if (!scroller) return;
+ const thead = scroller.querySelector("thead");
+ const headH = thead ? thead.getBoundingClientRect().height : 0;
const rowRect = row.getBoundingClientRect();
const scRect = scroller.getBoundingClientRect();
- const delta = rowRect.top - scRect.top - scRect.height / 2 + rowRect.height / 2;
+ const delta = rowRect.top - scRect.top - headH - 2;
scroller.scrollTo({ top: scroller.scrollTop + delta, behavior: "smooth" });
};