fix: correctly adjust tooltip position when it overflows the viewport (#53396)

This commit is contained in:
Dmaziyo 2025-04-28 11:31:38 +08:00
parent a1e9f530eb
commit d27914ed82

View File

@ -38,15 +38,11 @@ export function getOverflowOptions(
case 'top':
case 'bottom':
baseOverflow.shiftX = arrowOffset.arrowOffsetHorizontal * 2 + arrowWidth;
baseOverflow.shiftY = true;
baseOverflow.adjustY = true;
break;
case 'left':
case 'right':
baseOverflow.shiftY = arrowOffset.arrowOffsetVertical * 2 + arrowWidth;
baseOverflow.shiftX = true;
baseOverflow.adjustX = true;
break;
}