diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-11-06 22:49:51 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-11-06 22:49:51 +0900 |
| commit | f167d302249473cb6d643a3282559fbb10bada8c (patch) | |
| tree | e20bb7e034c8e88eb738481e42b9a486a72636a3 /src/components/ParksTable.astro | |
| parent | 5dfc584c9dcb89d4c00300b261107aa08c77e2e2 (diff) | |
parks: 地図の名前表示と表スクロール、選択バーを調整
公共施設の名前をズーム15から表示し、切替時のみ処理するようにした。表は枠内で該当行を先頭にスクロール。選択バーのリンクを「Gマップ」「経路」にし、一覧で見るを削除。全公園の点滅、枠線の細線化、閉じるボタンの折りたたみ、挿入アニメーションを調整。
Diffstat (limited to 'src/components/ParksTable.astro')
| -rw-r--r-- | src/components/ParksTable.astro | 4 |
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" }); }; |
