Made tracks more visible at smaller scales

*Made all tracks at least 1px wide, even at small scales, which improves their visibility
This commit is contained in:
izawartka 2025-06-08 13:34:40 +02:00
parent c6d4629a34
commit ea23a691bf
2 changed files with 11 additions and 2 deletions

View File

@ -10,6 +10,11 @@
stroke-width: 1.44px; stroke-width: 1.44px;
} }
.map svg path.track-unscaled {
stroke-width: 1px;
vector-effect: non-scaling-stroke;
}
.map svg text { .map svg text {
font-size: 2px; font-size: 2px;
text-shadow: 0 0 16px #000; text-shadow: 0 0 16px #000;

View File

@ -24,11 +24,15 @@ function StatelessTrackRenderer(props) {
const defs = getTrackDefs(object, trackColorMode); const defs = getTrackDefs(object, trackColorMode);
return ( return (
<g> <g id={`track-${object.id}`}>
{defs} {defs}
<path <path
d={path} d={path}
id={`track-${object.id}`} stroke={color}
className="track-unscaled"
/>
<path
d={path}
stroke={color} stroke={color}
className="track" className="track"
/> />