Set viewBox for the generated SVG

This allows browsers to scale the SVG correctly.
This commit is contained in:
Thomas Kolb 2023-11-16 20:38:39 +01:00
parent 76473a62fa
commit d8dec85a2c

View file

@ -524,7 +524,7 @@ def render(ref_lat, ref_lon, output_stream, adif_stream):
# generate the SVG
doc = svgwrite.Drawing("/tmp/test.svg", size=(2*R, 2*R))
doc = svgwrite.Drawing("/tmp/test.svg", size=(2*R, 2*R), viewBox=f"-1 -1 {2*R+2} {2*R+2}")
doc.defs.add(doc.style("""
.country {