feat: use elements dimensions for scaling

This commit is contained in:
Arnošt Pleskot 2023-08-10 21:35:05 +02:00
parent c731bd13b6
commit b77b7ccce1
No known key found for this signature in database
2 changed files with 10 additions and 2 deletions

View file

@ -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;