This commit is contained in:
timmy
2022-10-28 12:39:10 +00:00
committed by GitHub

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];
};