@rc-component/trigger 2.3.0 → 2.3.1
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
|
var offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
481
481
|
var 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
|
var nextOffsetInfo = {
|
|
491
491
|
ready: true,
|
package/lib/hooks/useAlign.js
CHANGED
|
@@ -488,12 +488,12 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
488
488
|
var offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
489
489
|
var offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
|
|
490
490
|
if (_scaleX === 1) {
|
|
491
|
-
nextOffsetX = Math.
|
|
492
|
-
offsetX4Right = Math.
|
|
491
|
+
nextOffsetX = Math.floor(nextOffsetX);
|
|
492
|
+
offsetX4Right = Math.floor(offsetX4Right);
|
|
493
493
|
}
|
|
494
494
|
if (_scaleY === 1) {
|
|
495
|
-
nextOffsetY = Math.
|
|
496
|
-
offsetY4Bottom = Math.
|
|
495
|
+
nextOffsetY = Math.floor(nextOffsetY);
|
|
496
|
+
offsetY4Bottom = Math.floor(offsetY4Bottom);
|
|
497
497
|
}
|
|
498
498
|
var nextOffsetInfo = {
|
|
499
499
|
ready: true,
|