From a991c39f29983cff64ee51bbd86ff1cda2cf138c Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Sun, 25 May 2025 00:51:17 -0500 Subject: [PATCH] scripts: Dropped max-width from generated svgs Not sure what the point of this was, I think it was copied from a d3 example svg at some point. But it forces the svg to always fit in the window, even if this makes the svg unreadable. These svgs tend to end up questionably large in order to fit in the most info, so the unreadableness ends up a real problem for even modest window sizes. --- scripts/codemapsvg.py | 4 +--- scripts/dbgbmapsvg.py | 4 +--- scripts/treemapsvg.py | 8 +++----- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/codemapsvg.py b/scripts/codemapsvg.py index d61cf9d7..110aad81 100755 --- a/scripts/codemapsvg.py +++ b/scripts/codemapsvg.py @@ -1185,9 +1185,7 @@ def main(paths, output, *, 'viewBox="0,0,%(width)d,%(height)d" ' 'width="%(width)d" ' 'height="%(height)d" ' - 'style="max-width: 100%%; ' - 'height: auto; ' - 'font: %(font_size)dpx %(font)s; ' + 'style="font: %(font_size)dpx %(font)s; ' 'background-color: %(background)s; ' 'user-select: %(user_select)s;">' % dict( width=width_, diff --git a/scripts/dbgbmapsvg.py b/scripts/dbgbmapsvg.py index 304729d8..fd74029f 100755 --- a/scripts/dbgbmapsvg.py +++ b/scripts/dbgbmapsvg.py @@ -4523,9 +4523,7 @@ def main(disk, output, mroots=None, *, 'viewBox="0,0,%(width)d,%(height)d" ' 'width="%(width)d" ' 'height="%(height)d" ' - 'style="max-width: 100%%; ' - 'height: auto; ' - 'font: %(font_size)dpx %(font)s; ' + 'style="font: %(font_size)dpx %(font)s; ' 'background-color: %(background)s; ' 'user-select: %(user_select)s;">' % dict( width=width_, diff --git a/scripts/treemapsvg.py b/scripts/treemapsvg.py index 1f3b8e0c..dd59869f 100755 --- a/scripts/treemapsvg.py +++ b/scripts/treemapsvg.py @@ -884,14 +884,12 @@ def main(csv_paths, output, *, # yes this is svg f.write('' % dict( + 'style="font: %(font_size)dpx %(font)s; ' + 'background-color: %(background)s;">' % dict( width=width_, height=height_, font=','.join(font),