File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -698,13 +698,13 @@ export default function useAlign(
698698 popupMirrorRect . bottom - popupRect . y - ( nextOffsetY + popupRect . height ) ;
699699
700700 if ( scaleX === 1 ) {
701- nextOffsetX = Math . round ( nextOffsetX ) ;
702- offsetX4Right = Math . round ( offsetX4Right ) ;
701+ nextOffsetX = Math . floor ( nextOffsetX ) ;
702+ offsetX4Right = Math . floor ( offsetX4Right ) ;
703703 }
704704
705705 if ( scaleY === 1 ) {
706- nextOffsetY = Math . round ( nextOffsetY ) ;
707- offsetY4Bottom = Math . round ( offsetY4Bottom ) ;
706+ nextOffsetY = Math . floor ( nextOffsetY ) ;
707+ offsetY4Bottom = Math . floor ( offsetY4Bottom ) ;
708708 }
709709
710710 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