@douyinfe/semi-ui 2.36.1-alpha.1 → 2.36.1-alpha.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.
@@ -18667,7 +18667,7 @@ class foundation_Tooltip extends foundation {
18667
18667
  return null;
18668
18668
  }
18669
18669
  calcPosStyle(props) {
18670
- var _a, _b;
18670
+ var _a, _b, _c;
18671
18671
  const {
18672
18672
  spacing,
18673
18673
  isOverFlow
@@ -18681,7 +18681,7 @@ class foundation_Tooltip extends foundation {
18681
18681
  // eslint-disable-next-line
18682
18682
  const position = props.position != null ? props.position : this.getProp('position');
18683
18683
  // eslint-disable-next-line
18684
- const SPACING = spacing != null ? spacing : this.getProp('spacing');
18684
+ let SPACING = spacing != null ? spacing : this.getProp('spacing');
18685
18685
  const {
18686
18686
  arrowPointAtCenter,
18687
18687
  showArrow,
@@ -18712,6 +18712,10 @@ class foundation_Tooltip extends foundation {
18712
18712
  const isTriggerNearLeft = middleX - containerRect.left < containerRect.right - middleX;
18713
18713
  const isTriggerNearTop = middleY - containerRect.top < containerRect.bottom - middleY;
18714
18714
  const isWrapperWidthOverflow = wrapperRect.width > innerWidth;
18715
+ const scaled = Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) - ((_a = this._adapter.getContainer()) === null || _a === void 0 ? void 0 : _a.clientWidth)) > 1;
18716
+ if (scaled) {
18717
+ SPACING = SPACING * wrapperRect.width / this._adapter.getContainer().clientWidth;
18718
+ }
18715
18719
  switch (position) {
18716
18720
  case 'top':
18717
18721
  // left = middleX;
@@ -18828,10 +18832,10 @@ class foundation_Tooltip extends foundation {
18828
18832
  // Calculate container positioning relative to window
18829
18833
  left = left - containerRect.left;
18830
18834
  top = top - containerRect.top;
18831
- if (Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) - ((_a = this._adapter.getContainer()) === null || _a === void 0 ? void 0 : _a.clientWidth)) > 1) {
18835
+ if (Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) - ((_b = this._adapter.getContainer()) === null || _b === void 0 ? void 0 : _b.clientWidth)) > 1) {
18832
18836
  left /= wrapperRect.width / this._adapter.getContainer().clientWidth;
18833
18837
  }
18834
- if (Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.height) - ((_b = this._adapter.getContainer()) === null || _b === void 0 ? void 0 : _b.clientHeight)) > 1) {
18838
+ if (Math.abs((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.height) - ((_c = this._adapter.getContainer()) === null || _c === void 0 ? void 0 : _c.clientHeight)) > 1) {
18835
18839
  top /= wrapperRect.height / this._adapter.getContainer().clientHeight;
18836
18840
  }
18837
18841
  /**