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);