mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
Suppresses unnecessary fill-rule attribute in SVG (#1397)
This commit is contained in:
parent
8b805d436f
commit
6abcb2d87f
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue