SVG and PreserveAspectRatio
How do you compromise with the user's viewport?
- There are two viewports to consider, the browser's viewport and the SVG tag's viewport.
- If the aspect ratio of the SVG's viewport does not match that of the browser's viewport, the browser deals with the difference in the way specified at the
preserveAspectRatio
attribute of the SVG tag. preserveAspectRatio="xMinYMin meet"
places SVG's viewport so that the upper left corner of the browser's viewport matches that of the SVG's viewport.