From 57d4e8a980acb10ac446de66f2ca50f4f0c49e84 Mon Sep 17 00:00:00 2001 From: Wenzhao Hu <12122021+wzhudev@users.noreply.github.com> Date: Tue, 21 May 2024 10:57:59 +0800 Subject: [PATCH] fix(ui): fix position error --- packages/design/src/components/popup/RectPopup.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/design/src/components/popup/RectPopup.tsx b/packages/design/src/components/popup/RectPopup.tsx index 272402bb41..163c76e101 100644 --- a/packages/design/src/components/popup/RectPopup.tsx +++ b/packages/design/src/components/popup/RectPopup.tsx @@ -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 }; };