mirror of
https://github.com/dream-num/univer.git
synced 2026-09-24 15:32:18 +08:00
fix(ui): fix position error
This commit is contained in:
@@ -84,7 +84,7 @@ function calcPopupPosition(layout: IPopupLayoutInfo): { top: number; left: numbe
|
||||
// If the popup element exceed the visible area. We should "push" it back.
|
||||
const verticalStyle = ((startY + height) > containerHeight)
|
||||
? { top: Math.max(endY - height, PUSHING_MINIMUM_GAP) } // on top
|
||||
: { top: Math.min(startX, containerHeight - height - PUSHING_MINIMUM_GAP) }; // on bottom
|
||||
: { top: Math.min(startY, containerHeight - height - PUSHING_MINIMUM_GAP) }; // on bottom
|
||||
|
||||
return { ...verticalStyle, ...horizontalStyle };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user