From d8dec85a2cb1bd9d6471f492485871b251a23a00 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Thu, 16 Nov 2023 20:38:39 +0100 Subject: [PATCH] Set viewBox for the generated SVG This allows browsers to scale the SVG correctly. --- qsomap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qsomap.py b/qsomap.py index a989af6..a29b1b8 100644 --- a/qsomap.py +++ b/qsomap.py @@ -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 {