fix: increase rounding snap tolerance to 4px to prevent background line bleed when padding is 0
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user