fix: update how top overflow is calculated for overlays (#4718)

This commit is contained in:
ggurdin 2025-11-20 16:10:07 -05:00 committed by GitHub
parent 9a5e9ea2e9
commit a504b8b832
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,14 +155,11 @@ class OverlayUtil {
final horizontalMidpoint = (transformTargetOffset.dx - columnWidth) +
(transformTargetSize.width / 2);
final verticalMidpoint =
transformTargetOffset.dy + (transformTargetSize.height / 2);
final halfMaxWidth = maxWidth / 2;
final hasLeftOverflow = (horizontalMidpoint - halfMaxWidth) < 10;
final hasRightOverflow = (horizontalMidpoint + halfMaxWidth) >
(MediaQuery.of(context).size.width - columnWidth - 10);
hasTopOverflow = (verticalMidpoint - maxHeight) < 0;
hasTopOverflow = maxHeight + kToolbarHeight > transformTargetOffset.dy;
double xOffset = 0;