From 1216f59e05026ee19a2163efc72eab15ec14d642 Mon Sep 17 00:00:00 2001 From: Donal Date: Sun, 13 Sep 2020 16:40:48 +0800 Subject: [PATCH] =?UTF-8?q?svg=E8=B7=AF=E5=BE=84=E9=99=90=E5=88=B6?= =?UTF-8?q?=E6=9C=80=E5=B0=8F=E5=83=8F=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HelloWorld.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue index 4e4d8d7..c293737 100644 --- a/src/components/HelloWorld.vue +++ b/src/components/HelloWorld.vue @@ -262,8 +262,8 @@ export default { const ctm = pathObject['@_CTM']; let svg = document.createElementNS('http://www.w3.org/2000/svg','svg'); svg.setAttribute('version','1.1'); - svg.style.width = boundary.w; - svg.style.height = boundary.h; + svg.style.width = boundary.w>1?boundary.w:1; + svg.style.height = boundary.h>1?boundary.h:1; let path = document.createElementNS('http://www.w3.org/2000/svg','path'); if (lineWidth) { defaultLineWith = converterDpi(lineWidth);