Wider map label clamp (black diamond was still clipping)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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`;
|
||||||
|
|||||||
Reference in New Issue
Block a user