File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727coverage
2828yarn.lock
2929package-lock.json
30+ pnpm-lock.yaml
3031bun.lockb
3132
3233# dumi
Original file line number Diff line number Diff line change @@ -677,13 +677,13 @@ export default function useAlign(
677677 popupMirrorRect . bottom - popupRect . y - ( nextOffsetY + popupRect . height ) ;
678678
679679 if ( scaleX === 1 ) {
680- nextOffsetX = Math . round ( nextOffsetX ) ;
681- offsetX4Right = Math . round ( offsetX4Right ) ;
680+ nextOffsetX = Math . floor ( nextOffsetX ) ;
681+ offsetX4Right = Math . floor ( offsetX4Right ) ;
682682 }
683683
684684 if ( scaleY === 1 ) {
685- nextOffsetY = Math . round ( nextOffsetY ) ;
686- offsetY4Bottom = Math . round ( offsetY4Bottom ) ;
685+ nextOffsetY = Math . floor ( nextOffsetY ) ;
686+ offsetY4Bottom = Math . floor ( offsetY4Bottom ) ;
687687 }
688688
689689 const nextOffsetInfo = {
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ describe('Trigger.Align', () => {
272272 } ) ;
273273 } ) ;
274274
275- it ( 'round when decimal precision' , async ( ) => {
275+ it ( 'floor when decimal precision' , async ( ) => {
276276 rectX = 22.6 ;
277277 rectY = 33.4 ;
278278 rectWidth = 33.7 ;
@@ -293,7 +293,7 @@ describe('Trigger.Align', () => {
293293 await awaitFakeTimer ( ) ;
294294
295295 expect ( document . querySelector ( '.rc-trigger-popup' ) ) . toHaveStyle ( {
296- top : `56px ` ,
296+ top : `55px ` ,
297297 } ) ;
298298 } ) ;
299299} ) ;
You can’t perform that action at this time.
0 commit comments