This commit is contained in:
timmy 2022-10-28 12:39:10 +00:00 committed by GitHub
commit 104d52cd99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,7 @@ export const calculateBackgroundRendering = (
backgroundPositioningArea
);
const [sizeWidth, sizeHeight] = backgroundImageSize;
let [sizeWidth, sizeHeight] = backgroundImageSize;
const position = getAbsoluteValueForTuple(
getBackgroundValueForIndex(container.styles.backgroundPosition, index),
@ -77,6 +77,9 @@ export const calculateBackgroundRendering = (
const offsetX = Math.round(backgroundPositioningArea.left + position[0]);
const offsetY = Math.round(backgroundPositioningArea.top + position[1]);
sizeWidth = Math.max(1,sizeWidth)
sizeHeight = Math.max(1,sizeHeight)
return [path, offsetX, offsetY, sizeWidth, sizeHeight];
};