fix: use nonzero fill rule instead of evenodd
All checks were successful
Deploy Internet for Kids / Build & Push (push) Successful in 11s
Deploy Internet for Kids / Deploy (push) Successful in 6s
Deploy Internet for Kids / Health Check (push) Successful in 2s
Deploy Internet for Kids / Smoke Tests (push) Successful in 3s
Deploy Internet for Kids / IndexNow Ping (push) Successful in 7s
Deploy Internet for Kids / Promote to Latest (push) Successful in 2s
Deploy Internet for Kids / Rollback (push) Has been skipped
Deploy Internet for Kids / Audit (push) Successful in 2s

evenodd creates transparent stripes where polygon rings overlap at
certain latitudes. nonzero fills correctly regardless of ring overlap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-04-04 13:24:04 +03:00
parent 89c8567dcc
commit 60e63b8cd1

View File

@@ -123,7 +123,7 @@
}); });
} }
}); });
ctx.fill('evenodd'); ctx.fill('nonzero');
// Pass 2: overdraw colored countries only // Pass 2: overdraw colored countries only
geoData.features.forEach(function(f) { geoData.features.forEach(function(f) {
@@ -154,7 +154,7 @@
} else if (geom.type === 'LineString') { } else if (geom.type === 'LineString') {
traceLine(ctx, geom.coordinates, sx, sy); traceLine(ctx, geom.coordinates, sx, sy);
} }
if (fill) ctx.fill('evenodd'); if (fill) ctx.fill('nonzero');
else ctx.stroke(); else ctx.stroke();
} }