@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.
@@ -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.round(nextOffsetX);
484
- offsetX4Right = Math.round(offsetX4Right);
483
+ nextOffsetX = Math.floor(nextOffsetX);
484
+ offsetX4Right = Math.floor(offsetX4Right);
485
485
  }
486
486
  if (scaleY === 1) {
487
- nextOffsetY = Math.round(nextOffsetY);
488
- offsetY4Bottom = Math.round(offsetY4Bottom);
487
+ nextOffsetY = Math.floor(nextOffsetY);
488
+ offsetY4Bottom = Math.floor(offsetY4Bottom);
489
489
  }
490
490
  const nextOffsetInfo = {
491
491
  ready: true,
@@ -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.round(nextOffsetX);
493
- offsetX4Right = Math.round(offsetX4Right);
492
+ nextOffsetX = Math.floor(nextOffsetX);
493
+ offsetX4Right = Math.floor(offsetX4Right);
494
494
  }
495
495
  if (scaleY === 1) {
496
- nextOffsetY = Math.round(nextOffsetY);
497
- offsetY4Bottom = Math.round(offsetY4Bottom);
496
+ nextOffsetY = Math.floor(nextOffsetY);
497
+ offsetY4Bottom = Math.floor(offsetY4Bottom);
498
498
  }
499
499
  const nextOffsetInfo = {
500
500
  ready: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/trigger",
3
- "version": "3.8.1",
3
+ "version": "3.8.2",
4
4
  "description": "base abstract trigger component for react",
5
5
  "engines": {
6
6
  "node": ">=8.x"