Suppresses unnecessary fill-rule attribute in SVG (#1397)
This commit is contained in:
parent
8b805d436f
commit
6abcb2d87f
@ -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…
x
Reference in New Issue
Block a user