mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: svg and png frame clipping cases (#8515)
This commit is contained in:
parent
e0a22edfbd
commit
44a1c8d857
1 changed files with 10 additions and 0 deletions
|
@ -185,6 +185,11 @@ export const exportToCanvas = async (
|
||||||
exportingFrame ?? null,
|
exportingFrame ?? null,
|
||||||
appState.frameRendering ?? 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({
|
const elementsForRender = prepareElementsForRender({
|
||||||
elements,
|
elements,
|
||||||
|
@ -351,6 +356,11 @@ export const exportToSvg = async (
|
||||||
}) rotate(${frame.angle} ${cx} ${cy})"
|
}) rotate(${frame.angle} ${cx} ${cy})"
|
||||||
width="${frame.width}"
|
width="${frame.width}"
|
||||||
height="${frame.height}"
|
height="${frame.height}"
|
||||||
|
${
|
||||||
|
exportingFrame
|
||||||
|
? ""
|
||||||
|
: `rx=${FRAME_STYLE.radius} ry=${FRAME_STYLE.radius}`
|
||||||
|
}
|
||||||
>
|
>
|
||||||
</rect>
|
</rect>
|
||||||
</clipPath>`;
|
</clipPath>`;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue