diff --git a/svg-crowbar-2.js b/svg-crowbar-2.js index 12d58ed..06bf90c 100644 --- a/svg-crowbar-2.js +++ b/svg-crowbar-2.js @@ -211,9 +211,13 @@ function setInlineStyles(svg, emptySvgDeclarationComputed) { function explicitlySetStyle (element) { + var clientRect = { width: "auto", height: "auto"}; var cSSStyleDeclarationComputed = getComputedStyle(element); var i, len, key, value; var computedStyleStr = ""; + if (element.tagName === "rect") { + clientRect = element.getBoundingClientRect(); + } for (i=0, len=cSSStyleDeclarationComputed.length; i