@galacean/engine-ui 0.0.0-experimental-2.0-migrate.4 → 0.0.0-experimental-2.0-migrate.6

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/dist/module.js CHANGED
@@ -292,10 +292,10 @@ var SortEntry = function SortEntry() {
292
292
  this._isParentDirty = true;
293
293
  this._updateWorldFlagWithParentRectChange(TransformModifyFlags.WmWpWeWqWsWus);
294
294
  };
295
- // @ts-ignore
296
- _proto._cloneTo = function _cloneTo(target) {
297
- // @ts-ignore
298
- Transform.prototype._cloneTo.call(this, target);
295
+ /**
296
+ * @inheritdoc
297
+ */ _proto._onClone = function _onClone(target) {
298
+ Transform.prototype._onClone.call(this, target);
299
299
  var size = target._size, pivot = target._pivot;
300
300
  // @ts-ignore
301
301
  size._onValueChanged = pivot._onValueChanged = null;
@@ -735,11 +735,8 @@ var RectMask2D = /*#__PURE__*/ function(Component) {
735
735
  _proto._onDisableInScene = function _onDisableInScene() {
736
736
  this.entity._updateUIHierarchyVersion(UICanvas._hierarchyCounter);
737
737
  };
738
- // @ts-ignore
739
- _proto._cloneTo = function _cloneTo(target) {
740
- // RectMask2D extends Component directly; Component.prototype 上没有 _cloneTo,
741
- // 不能 super._cloneTo(target) — 会拿到 undefined 报 "Cannot read properties of undefined (reading 'call')"。
742
- // (Image/Mask 走 Renderer 链路所以能 super;RectMask2D 不在 Renderer 链路里。)
738
+ _proto._onClone = function _onClone(target) {
739
+ // RectMask2D extends Component directly, so it has no parent clone hook to call.
743
740
  var targetSoftness = target._softness;
744
741
  // @ts-ignore
745
742
  targetSoftness._onValueChanged = null;
@@ -1578,8 +1575,8 @@ var UICanvas = /*#__PURE__*/ function(Component) {
1578
1575
  }
1579
1576
  };
1580
1577
  /**
1581
- * @internal
1582
- */ _proto._cloneTo = function _cloneTo(target) {
1578
+ * @inheritdoc
1579
+ */ _proto._onClone = function _onClone(target) {
1583
1580
  target.renderMode = this._renderMode;
1584
1581
  };
1585
1582
  _proto._getRenderers = function _getRenderers() {
@@ -2546,10 +2543,9 @@ var Button = /*#__PURE__*/ function(UIInteractive) {
2546
2543
  }
2547
2544
  };
2548
2545
  /**
2549
- * @internal
2550
- */ _proto._cloneTo = function _cloneTo(target) {
2551
- // @ts-ignore
2552
- UIRenderer1.prototype._cloneTo.call(this, target);
2546
+ * @inheritdoc
2547
+ */ _proto._onClone = function _onClone(target) {
2548
+ UIRenderer1.prototype._onClone.call(this, target);
2553
2549
  target.sprite = this._sprite;
2554
2550
  target.drawMode = this._drawMode;
2555
2551
  };
@@ -2879,9 +2875,9 @@ __decorate([
2879
2875
  /**
2880
2876
  * @internal
2881
2877
  */ // @ts-ignore
2882
- _proto._cloneTo = function _cloneTo(target) {
2878
+ _proto._onClone = function _onClone(target) {
2883
2879
  // @ts-ignore
2884
- _MaskRenderable.prototype._cloneTo.call(this, target);
2880
+ _MaskRenderable.prototype._onClone.call(this, target);
2885
2881
  this._cloneMaskData(target);
2886
2882
  };
2887
2883
  _proto._updateBounds = function _updateBounds(worldBounds) {
@@ -3576,8 +3572,8 @@ var TextChunk = function TextChunk() {
3576
3572
  this._target = null;
3577
3573
  };
3578
3574
  /**
3579
- * @internal
3580
- */ _proto._cloneTo = function _cloneTo(target) {
3575
+ * @inheritdoc
3576
+ */ _proto._onClone = function _onClone(target) {
3581
3577
  target._addStateValuesReferCount(1);
3582
3578
  };
3583
3579
  /**