leafer-ui 1.0.3 → 1.0.4

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/web.js CHANGED
@@ -4486,15 +4486,16 @@ var LeaferUI = (function (exports) {
4486
4486
  }
4487
4487
  getLayoutBounds(type, relative = 'world', unscale) {
4488
4488
  const { leaf } = this;
4489
- let point, matrix, bounds = this.getInnerBounds(type);
4489
+ let point, matrix, layoutBounds, bounds = this.getInnerBounds(type);
4490
4490
  switch (relative) {
4491
4491
  case 'world':
4492
4492
  point = leaf.getWorldPoint(bounds);
4493
4493
  matrix = leaf.__world;
4494
4494
  break;
4495
4495
  case 'local':
4496
+ const { scaleX, scaleY, rotation, skewX, skewY } = leaf.__;
4497
+ layoutBounds = { scaleX, scaleY, rotation, skewX, skewY };
4496
4498
  point = leaf.getLocalPointByInner(bounds);
4497
- matrix = leaf.__localMatrix;
4498
4499
  break;
4499
4500
  case 'inner':
4500
4501
  point = bounds;
@@ -4506,7 +4507,8 @@ var LeaferUI = (function (exports) {
4506
4507
  point = leaf.getWorldPoint(bounds, relative);
4507
4508
  matrix = getRelativeWorld$1(leaf, relative, true);
4508
4509
  }
4509
- const layoutBounds = MatrixHelper.getLayout(matrix);
4510
+ if (!layoutBounds)
4511
+ layoutBounds = MatrixHelper.getLayout(matrix);
4510
4512
  copy$6(layoutBounds, bounds);
4511
4513
  PointHelper.copy(layoutBounds, point);
4512
4514
  if (unscale) {
@@ -5917,7 +5919,7 @@ var LeaferUI = (function (exports) {
5917
5919
  }
5918
5920
  }
5919
5921
 
5920
- const version = "1.0.3";
5922
+ const version = "1.0.4";
5921
5923
 
5922
5924
  const debug$7 = Debug.get('LeaferCanvas');
5923
5925
  class LeaferCanvas extends LeaferCanvasBase {
@@ -7590,10 +7592,10 @@ var LeaferUI = (function (exports) {
7590
7592
  export(filename, options) {
7591
7593
  return Export.export(this, filename, options);
7592
7594
  }
7593
- clone(newData) {
7595
+ clone(data) {
7594
7596
  const json = this.toJSON();
7595
- if (newData)
7596
- Object.assign(json, newData);
7597
+ if (data)
7598
+ Object.assign(json, data);
7597
7599
  return UI_1.one(json);
7598
7600
  }
7599
7601
  static one(data, x, y, width, height) {