@rc-component/trigger 3.8.1 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/hooks/useAlign.js +4 -4
- package/lib/hooks/useAlign.js +4 -4
- package/package.json +1 -1
package/es/hooks/useAlign.js
CHANGED
|
@@ -480,12 +480,12 @@ export default function useAlign(open, popupEle, target, placement, builtinPlace
|
|
|
480
480
|
let offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
481
481
|
let offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
|
|
482
482
|
if (scaleX === 1) {
|
|
483
|
-
nextOffsetX = Math.
|
|
484
|
-
offsetX4Right = Math.
|
|
483
|
+
nextOffsetX = Math.floor(nextOffsetX);
|
|
484
|
+
offsetX4Right = Math.floor(offsetX4Right);
|
|
485
485
|
}
|
|
486
486
|
if (scaleY === 1) {
|
|
487
|
-
nextOffsetY = Math.
|
|
488
|
-
offsetY4Bottom = Math.
|
|
487
|
+
nextOffsetY = Math.floor(nextOffsetY);
|
|
488
|
+
offsetY4Bottom = Math.floor(offsetY4Bottom);
|
|
489
489
|
}
|
|
490
490
|
const nextOffsetInfo = {
|
|
491
491
|
ready: true,
|
package/lib/hooks/useAlign.js
CHANGED
|
@@ -489,12 +489,12 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
489
489
|
let offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
490
490
|
let offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
|
|
491
491
|
if (scaleX === 1) {
|
|
492
|
-
nextOffsetX = Math.
|
|
493
|
-
offsetX4Right = Math.
|
|
492
|
+
nextOffsetX = Math.floor(nextOffsetX);
|
|
493
|
+
offsetX4Right = Math.floor(offsetX4Right);
|
|
494
494
|
}
|
|
495
495
|
if (scaleY === 1) {
|
|
496
|
-
nextOffsetY = Math.
|
|
497
|
-
offsetY4Bottom = Math.
|
|
496
|
+
nextOffsetY = Math.floor(nextOffsetY);
|
|
497
|
+
offsetY4Bottom = Math.floor(offsetY4Bottom);
|
|
498
498
|
}
|
|
499
499
|
const nextOffsetInfo = {
|
|
500
500
|
ready: true,
|