@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/main.js CHANGED
@@ -296,10 +296,10 @@ var SortEntry = function SortEntry() {
296
296
  this._isParentDirty = true;
297
297
  this._updateWorldFlagWithParentRectChange(engine.TransformModifyFlags.WmWpWeWqWsWus);
298
298
  };
299
- // @ts-ignore
300
- _proto._cloneTo = function _cloneTo(target) {
301
- // @ts-ignore
302
- Transform.prototype._cloneTo.call(this, target);
299
+ /**
300
+ * @inheritdoc
301
+ */ _proto._onClone = function _onClone(target) {
302
+ Transform.prototype._onClone.call(this, target);
303
303
  var size = target._size, pivot = target._pivot;
304
304
  // @ts-ignore
305
305
  size._onValueChanged = pivot._onValueChanged = null;
@@ -739,11 +739,8 @@ exports.RectMask2D = /*#__PURE__*/ function(Component) {
739
739
  _proto._onDisableInScene = function _onDisableInScene() {
740
740
  this.entity._updateUIHierarchyVersion(exports.UICanvas._hierarchyCounter);
741
741
  };
742
- // @ts-ignore
743
- _proto._cloneTo = function _cloneTo(target) {
744
- // RectMask2D extends Component directly; Component.prototype 上没有 _cloneTo,
745
- // 不能 super._cloneTo(target) — 会拿到 undefined 报 "Cannot read properties of undefined (reading 'call')"。
746
- // (Image/Mask 走 Renderer 链路所以能 super;RectMask2D 不在 Renderer 链路里。)
742
+ _proto._onClone = function _onClone(target) {
743
+ // RectMask2D extends Component directly, so it has no parent clone hook to call.
747
744
  var targetSoftness = target._softness;
748
745
  // @ts-ignore
749
746
  targetSoftness._onValueChanged = null;
@@ -1582,8 +1579,8 @@ exports.UICanvas = /*#__PURE__*/ function(Component) {
1582
1579
  }
1583
1580
  };
1584
1581
  /**
1585
- * @internal
1586
- */ _proto._cloneTo = function _cloneTo(target) {
1582
+ * @inheritdoc
1583
+ */ _proto._onClone = function _onClone(target) {
1587
1584
  target.renderMode = this._renderMode;
1588
1585
  };
1589
1586
  _proto._getRenderers = function _getRenderers() {
@@ -2550,10 +2547,9 @@ var Button = /*#__PURE__*/ function(UIInteractive) {
2550
2547
  }
2551
2548
  };
2552
2549
  /**
2553
- * @internal
2554
- */ _proto._cloneTo = function _cloneTo(target) {
2555
- // @ts-ignore
2556
- UIRenderer1.prototype._cloneTo.call(this, target);
2550
+ * @inheritdoc
2551
+ */ _proto._onClone = function _onClone(target) {
2552
+ UIRenderer1.prototype._onClone.call(this, target);
2557
2553
  target.sprite = this._sprite;
2558
2554
  target.drawMode = this._drawMode;
2559
2555
  };
@@ -2883,9 +2879,9 @@ __decorate([
2883
2879
  /**
2884
2880
  * @internal
2885
2881
  */ // @ts-ignore
2886
- _proto._cloneTo = function _cloneTo(target) {
2882
+ _proto._onClone = function _onClone(target) {
2887
2883
  // @ts-ignore
2888
- _MaskRenderable.prototype._cloneTo.call(this, target);
2884
+ _MaskRenderable.prototype._onClone.call(this, target);
2889
2885
  this._cloneMaskData(target);
2890
2886
  };
2891
2887
  _proto._updateBounds = function _updateBounds(worldBounds) {
@@ -3580,8 +3576,8 @@ var TextChunk = function TextChunk() {
3580
3576
  this._target = null;
3581
3577
  };
3582
3578
  /**
3583
- * @internal
3584
- */ _proto._cloneTo = function _cloneTo(target) {
3579
+ * @inheritdoc
3580
+ */ _proto._onClone = function _onClone(target) {
3585
3581
  target._addStateValuesReferCount(1);
3586
3582
  };
3587
3583
  /**