Wider map label clamp (black diamond was still clipping)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wes
2026-07-22 11:17:08 -04:00
co-authored by Claude Fable 5
parent 8b9b5f2831
commit 16b837a2e7
+1 -1
View File
@@ -378,7 +378,7 @@ const pageUrl = new URL(Astro.url.pathname, Astro.site);
.sort((a, b) => a.lon - b.lon); .sort((a, b) => a.lon - b.lon);
top.forEach((r, i) => { top.forEach((r, i) => {
const t = document.createElementNS(NS, 'text'); const t = document.createElementNS(NS, 'text');
t.setAttribute('x', String(Math.min(594, Math.max(46, px(r.lon))))); t.setAttribute('x', String(Math.min(560, Math.max(80, px(r.lon)))));
t.setAttribute('y', String(py(r.lat) + (i % 2 ? 20 : -11))); t.setAttribute('y', String(py(r.lat) + (i % 2 ? 20 : -11)));
t.setAttribute('text-anchor', 'middle'); t.setAttribute('text-anchor', 'middle');
t.textContent = `${r.name.toLowerCase()} ${Math.round(r.wait_min)}m`; t.textContent = `${r.name.toLowerCase()} ${Math.round(r.wait_min)}m`;