diff --git a/src/data/index.ts b/src/data/index.ts index 1b97a5df..69ffed24 100644 --- a/src/data/index.ts +++ b/src/data/index.ts @@ -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, diff --git a/src/renderer/renderScene.ts b/src/renderer/renderScene.ts index 8426edfd..7e732f23 100644 --- a/src/renderer/renderScene.ts +++ b/src/renderer/renderScene.ts @@ -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, + ); + } }); }