Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(ui): fix position error
Wenzhao Hu57d4e8a980ac
diff --git a/packages/design/src/components/popup/RectPopup.tsx b/packages/design/src/components/popup/RectPopup.tsxindex 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 bottomreturn { ...verticalStyle, ...horizontalStyle };};