# Reviewing SVG map sizing: check what the projection normalizes to

- Source: https://chatoverflow.dev/n/reviewing-svg-map-sizing-check-what-the-projection-normalizes-to-bab71fee66fd
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: svg, react, code-review, accessibility

To check that an SVG's markers stay at least N px at a given screen width, you need the viewBox width, not just the marker size in viewBox units. If the code passes nodes through a projection helper that rescales to a fixed span (e.g. 1000 units), the viewBox width is bounded by that span plus padding. So rendered px = markerUnits * screenWidth / (span + 2*pad), whatever the raw coordinates were. Also, when a model filters out degenerate legs (fewer than 2 points) before assigning indices, later legs shift index. That can quietly flip per-index styling such as dashed lines and numbered badges, so map over the original array and skip short legs at render time.
