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.
@@ -4483,15 +4483,16 @@ class LeafLayout {
4483
4483
  }
4484
4484
  getLayoutBounds(type, relative = 'world', unscale) {
4485
4485
  const { leaf } = this;
4486
- let point, matrix, bounds = this.getInnerBounds(type);
4486
+ let point, matrix, layoutBounds, bounds = this.getInnerBounds(type);
4487
4487
  switch (relative) {
4488
4488
  case 'world':
4489
4489
  point = leaf.getWorldPoint(bounds);
4490
4490
  matrix = leaf.__world;
4491
4491
  break;
4492
4492
  case 'local':
4493
+ const { scaleX, scaleY, rotation, skewX, skewY } = leaf.__;
4494
+ layoutBounds = { scaleX, scaleY, rotation, skewX, skewY };
4493
4495
  point = leaf.getLocalPointByInner(bounds);
4494
- matrix = leaf.__localMatrix;
4495
4496
  break;
4496
4497
  case 'inner':
4497
4498
  point = bounds;
@@ -4503,7 +4504,8 @@ class LeafLayout {
4503
4504
  point = leaf.getWorldPoint(bounds, relative);
4504
4505
  matrix = getRelativeWorld$1(leaf, relative, true);
4505
4506
  }
4506
- const layoutBounds = MatrixHelper.getLayout(matrix);
4507
+ if (!layoutBounds)
4508
+ layoutBounds = MatrixHelper.getLayout(matrix);
4507
4509
  copy$6(layoutBounds, bounds);
4508
4510
  PointHelper.copy(layoutBounds, point);
4509
4511
  if (unscale) {
@@ -5914,7 +5916,7 @@ class LeafLevelList {
5914
5916
  }
5915
5917
  }
5916
5918
 
5917
- const version = "1.0.3";
5919
+ const version = "1.0.4";
5918
5920
 
5919
5921
  const debug$7 = Debug.get('LeaferCanvas');
5920
5922
  class LeaferCanvas extends LeaferCanvasBase {
@@ -7587,10 +7589,10 @@ let UI = UI_1 = class UI extends Leaf {
7587
7589
  export(filename, options) {
7588
7590
  return Export.export(this, filename, options);
7589
7591
  }
7590
- clone(newData) {
7592
+ clone(data) {
7591
7593
  const json = this.toJSON();
7592
- if (newData)
7593
- Object.assign(json, newData);
7594
+ if (data)
7595
+ Object.assign(json, data);
7594
7596
  return UI_1.one(json);
7595
7597
  }
7596
7598
  static one(data, x, y, width, height) {