Merge pull request #181 from paulkaplan/fix-stroke-measurement
Use zero if cannot parse stroke width
This commit is contained in:
@@ -197,7 +197,10 @@ class SvgRenderer {
|
|||||||
largestStrokeWidth = Math.max(largestStrokeWidth, 1);
|
largestStrokeWidth = Math.max(largestStrokeWidth, 1);
|
||||||
}
|
}
|
||||||
if (domElement.getAttribute('stroke-width')) {
|
if (domElement.getAttribute('stroke-width')) {
|
||||||
largestStrokeWidth = Math.max(largestStrokeWidth, Number(domElement.getAttribute('stroke-width')));
|
largestStrokeWidth = Math.max(
|
||||||
|
largestStrokeWidth,
|
||||||
|
Number(domElement.getAttribute('stroke-width')) || 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 0; i < domElement.childNodes.length; i++) {
|
for (let i = 0; i < domElement.childNodes.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user