Suppresses unnecessary fill-rule attribute in SVG (#1397)

pull/1398/head
fujimoto kyosuke 5 years ago committed by GitHub
parent 8b805d436f
commit 6abcb2d87f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -426,7 +426,11 @@ export function renderElementToSvg(
offsetY || 0 offsetY || 0
}) rotate(${degree} ${cx} ${cy})`, }) rotate(${degree} ${cx} ${cy})`,
); );
if (element.type === "line") { if (
element.type === "line" &&
isPathALoop(element.points) &&
element.backgroundColor !== "transparent"
) {
node.setAttribute("fill-rule", "evenodd"); node.setAttribute("fill-rule", "evenodd");
} }
group.appendChild(node); group.appendChild(node);

Loading…
Cancel
Save