From 67c7cea393508b41d5a1581fd1a45a1cc9699178 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Mon, 19 Apr 2021 22:33:56 +0200 Subject: [PATCH] fix in export as selection --- extensions/fablabchemnitz/export_selection.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions/fablabchemnitz/export_selection.py b/extensions/fablabchemnitz/export_selection.py index 7f6265b1..363f8a75 100644 --- a/extensions/fablabchemnitz/export_selection.py +++ b/extensions/fablabchemnitz/export_selection.py @@ -78,11 +78,9 @@ class ExportObject(inkex.EffectExtension): elem_copy.attrib['transform'] = str(elem.composed_transform()) group.append(elem_copy) - width = math.ceil(bbox.width) - height = math.ceil(bbox.height) - template.attrib['viewBox'] = f'0 0 {width} {height}' - template.attrib['width'] = f'{width}' + self.svg.unit - template.attrib['height'] = f'{height}' + self.svg.unit + template.attrib['viewBox'] = f'0 0 {bbox.width} {bbox.height}' + template.attrib['width'] = f'{bbox.width}' + self.svg.unit + template.attrib['height'] = f'{bbox.height}' + self.svg.unit if filename is None: filename = elem.attrib.get('id', None)