fix: increase rounding snap tolerance to 4px to prevent background line bleed when padding is 0

This commit is contained in:
aaravshirpurkar
2026-05-26 13:43:57 +05:30
parent 54677960d0
commit 8c7ea939ab
+2 -2
View File
@@ -408,8 +408,8 @@ function centerRectInBounds(params: { bounds: RenderRect; size: Size; maxSize: S
if ( if (
maxWidth >= boundsWidth && maxWidth >= boundsWidth &&
maxHeight >= boundsHeight && maxHeight >= boundsHeight &&
Math.abs(boundsWidth - resolvedWidth) <= 1 && Math.abs(boundsWidth - resolvedWidth) <= 4 &&
Math.abs(boundsHeight - resolvedHeight) <= 1 Math.abs(boundsHeight - resolvedHeight) <= 4
) { ) {
return { return {
x: boundsX, x: boundsX,