Merge pull request #657 from aaravshirpurkar/main

fix: increase rounding snap tolerance to 4px to prevent background line bleed when padding is 0
This commit is contained in:
Sid
2026-05-26 22:35:42 -07:00
committed by GitHub
+2 -2
View File
@@ -408,8 +408,8 @@ function centerRectInBounds(params: { bounds: RenderRect; size: Size; maxSize: S
if (
maxWidth >= boundsWidth &&
maxHeight >= boundsHeight &&
Math.abs(boundsWidth - resolvedWidth) <= 1 &&
Math.abs(boundsHeight - resolvedHeight) <= 1
Math.abs(boundsWidth - resolvedWidth) <= 4 &&
Math.abs(boundsHeight - resolvedHeight) <= 4
) {
return {
x: boundsX,