@@ -442,10 +442,9 @@ export default function useAlign(
442
442
nextOffsetY = tmpNextOffsetY ;
443
443
popupOffsetY = - popupOffsetY ;
444
444
445
- nextAlignInfo . points = [
446
- reversePoints ( popupPoints , 0 ) ,
447
- reversePoints ( targetPoints , 0 ) ,
448
- ] ;
445
+ nextAlignInfo . points = nextAlignInfo . points . map ( ( point ) =>
446
+ reversePoints ( splitPoints ( point ) , 0 ) ,
447
+ ) ;
449
448
} else {
450
449
prevFlipRef . current . bt = false ;
451
450
}
@@ -488,10 +487,9 @@ export default function useAlign(
488
487
nextOffsetY = tmpNextOffsetY ;
489
488
popupOffsetY = - popupOffsetY ;
490
489
491
- nextAlignInfo . points = [
492
- reversePoints ( popupPoints , 0 ) ,
493
- reversePoints ( targetPoints , 0 ) ,
494
- ] ;
490
+ nextAlignInfo . points = nextAlignInfo . points . map ( ( point ) =>
491
+ reversePoints ( splitPoints ( point ) , 0 ) ,
492
+ ) ;
495
493
} else {
496
494
prevFlipRef . current . tb = false ;
497
495
}
@@ -541,10 +539,9 @@ export default function useAlign(
541
539
nextOffsetX = tmpNextOffsetX ;
542
540
popupOffsetX = - popupOffsetX ;
543
541
544
- nextAlignInfo . points = [
545
- reversePoints ( popupPoints , 1 ) ,
546
- reversePoints ( targetPoints , 1 ) ,
547
- ] ;
542
+ nextAlignInfo . points = nextAlignInfo . points . map ( ( point ) =>
543
+ reversePoints ( splitPoints ( point ) , 1 ) ,
544
+ ) ;
548
545
} else {
549
546
prevFlipRef . current . rl = false ;
550
547
}
@@ -587,10 +584,9 @@ export default function useAlign(
587
584
nextOffsetX = tmpNextOffsetX ;
588
585
popupOffsetX = - popupOffsetX ;
589
586
590
- nextAlignInfo . points = [
591
- reversePoints ( popupPoints , 1 ) ,
592
- reversePoints ( targetPoints , 1 ) ,
593
- ] ;
587
+ nextAlignInfo . points = nextAlignInfo . points . map ( ( point ) =>
588
+ reversePoints ( splitPoints ( point ) , 1 ) ,
589
+ ) ;
594
590
} else {
595
591
prevFlipRef . current . lr = false ;
596
592
}
0 commit comments