fix: position of background and content on y axis

This commit is contained in:
Arnošt Pleskot 2023-08-30 14:49:25 +02:00
parent 97ff1222d9
commit 4b5ce5283b
No known key found for this signature in database
2 changed files with 20 additions and 22 deletions

View file

@ -90,7 +90,7 @@ export const exportToCanvas = async (
const onlyExportingSingleFrame = isOnlyExportingSingleFrame(elements);
let scrollXAdjustment = 0;
const scrollYAdjustment = 0;
let scrollYAdjustment = 0;
if (
exportWithFancyBackground &&
@ -114,6 +114,9 @@ export const exportToCanvas = async (
scrollXAdjustment =
(width - contentSize.width - (padding[1] + padding[3])) / 2;
scrollYAdjustment =
(height - contentSize.height - (padding[0] + padding[2])) / 2;
}
renderStaticScene({