Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: svg and png frame clipping cases (#8515)

David Luzar44a1c8d8573c
diff --git a/packages/excalidraw/scene/export.ts b/packages/excalidraw/scene/export.ts
index b120d0cc9e..6d1b963fcc 100644
--- a/packages/excalidraw/scene/export.ts
+++ b/packages/excalidraw/scene/export.ts
@@ -185,6 +185,11 @@ export const exportToCanvas = async (
exportingFrame ?? null,
appState.frameRendering ?? null,
);
+ // for canvas export, don't clip if exporting a specific frame as it would
+ // clip the corners of the content
+ if (exportingFrame) {
+ frameRendering.clip = false;
+ }
const elementsForRender = prepareElementsForRender({
elements,
@@ -351,6 +356,11 @@ export const exportToSvg = async (
}) rotate(${frame.angle} ${cx} ${cy})"
width="${frame.width}"
height="${frame.height}"
+ ${
+ exportingFrame
+ ? ""
+ : `rx=${FRAME_STYLE.radius} ry=${FRAME_STYLE.radius}`
+ }
>
</rect>
</clipPath>`;