mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: use elements dimensions for scaling
This commit is contained in:
parent
c731bd13b6
commit
b77b7ccce1
2 changed files with 10 additions and 2 deletions
|
@ -83,12 +83,17 @@ export const exportToCanvas = async (
|
|||
};
|
||||
|
||||
if (appState.fancyBackgroundImageUrl) {
|
||||
const contentBounds = getCommonBounds(elements);
|
||||
const updatedRenderProps = await applyFancyBackground({
|
||||
canvas,
|
||||
fancyBackgroundImageUrl: appState.fancyBackgroundImageUrl,
|
||||
backgroundColor: viewBackgroundColor,
|
||||
scale,
|
||||
renderConfig,
|
||||
contentDimensions: {
|
||||
w: contentBounds[2] - contentBounds[0],
|
||||
h: contentBounds[3] - contentBounds[1],
|
||||
},
|
||||
});
|
||||
|
||||
renderConfig = updatedRenderProps.renderConfig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue