Park map: fixed landmark labels (twister/sklooosh/haunted mansion/kiddie whip)

Wayfinding anchors across the park regions instead of the busiest rides;
name-only, since the glow and hover already carry the waits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wes
2026-07-22 11:51:25 -04:00
co-authored by Claude Opus 4.8
parent 5d08d6b1bb
commit 5e0529930e
+15 -5
View File
@@ -399,11 +399,21 @@ const pageUrl = new URL(Astro.url.pathname, Astro.site);
svg.append(glow, core, hit);
}
const top = [...rides]
.sort((a, b) => b.wait_min - a.wait_min)
.slice(0, 5)
// Fixed landmark labels for wayfinding, one per park region.
// Not the busiest rides — the glow + hover already carry the waits;
// these just give bearings against the satellite imagery.
const LANDMARKS = [
'twister',
'sklooosh',
'haunted mansion',
'kiddie whip',
];
const marks = LANDMARKS.map((key) =>
rides.find((r) => r.name.toLowerCase() === key),
)
.filter(Boolean)
.sort((a, b) => a.lon - b.lon);
top.forEach((r, i) => {
marks.forEach((r, i) => {
const t = document.createElementNS(NS, 'text');
t.setAttribute(
'x',
@@ -415,7 +425,7 @@ const pageUrl = new URL(Astro.url.pathname, Astro.site);
t.setAttribute('paint-order', 'stroke');
t.setAttribute('stroke', '#0b0d12');
t.setAttribute('stroke-width', String(3 * k));
t.textContent = `${r.name.toLowerCase()} ${Math.round(r.wait_min)}m`;
t.textContent = r.name.toLowerCase();
svg.append(t);
});