Remove deleted elements from svg export (#1021)
* Remove deleted elements from svg export * skip deleted elements * remove old comment Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
1546c00c0c
commit
0ad6f4ec6b
@ -291,8 +291,6 @@ export async function exportCanvas(
|
||||
if (!hasNonDeletedElements(elements)) {
|
||||
return window.alert(t("alerts.cannotExportEmptyCanvas"));
|
||||
}
|
||||
// calculate smallest area to fit the contents in
|
||||
|
||||
if (type === "svg") {
|
||||
const tempSvg = exportToSvg(elements, {
|
||||
exportBackground,
|
||||
|
@ -289,12 +289,14 @@ export function renderSceneToSvg(
|
||||
}
|
||||
// render elements
|
||||
elements.forEach(element => {
|
||||
renderElementToSvg(
|
||||
element,
|
||||
rsvg,
|
||||
svgRoot,
|
||||
element.x + offsetX,
|
||||
element.y + offsetY,
|
||||
);
|
||||
if (!element.isDeleted) {
|
||||
renderElementToSvg(
|
||||
element,
|
||||
rsvg,
|
||||
svgRoot,
|
||||
element.x + offsetX,
|
||||
element.y + offsetY,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user