@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.
@@ -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.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
  var nextOffsetInfo = {
491
491
  ready: true,
@@ -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.round(nextOffsetX);
492
- offsetX4Right = Math.round(offsetX4Right);
491
+ nextOffsetX = Math.floor(nextOffsetX);
492
+ offsetX4Right = Math.floor(offsetX4Right);
493
493
  }
494
494
  if (_scaleY === 1) {
495
- nextOffsetY = Math.round(nextOffsetY);
496
- offsetY4Bottom = Math.round(offsetY4Bottom);
495
+ nextOffsetY = Math.floor(nextOffsetY);
496
+ offsetY4Bottom = Math.floor(offsetY4Bottom);
497
497
  }
498
498
  var nextOffsetInfo = {
499
499
  ready: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/trigger",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "base abstract trigger component for react",
5
5
  "engines": {
6
6
  "node": ">=8.x"