@leafer-ui/worker 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
  class LeaferCanvas extends LeaferCanvasBase {
5920
5922
  get allowBackgroundColor() { return true; }
@@ -7414,10 +7416,10 @@ let UI = UI_1 = class UI extends Leaf {
7414
7416
  export(filename, options) {
7415
7417
  return Export.export(this, filename, options);
7416
7418
  }
7417
- clone(newData) {
7419
+ clone(data) {
7418
7420
  const json = this.toJSON();
7419
- if (newData)
7420
- Object.assign(json, newData);
7421
+ if (data)
7422
+ Object.assign(json, data);
7421
7423
  return UI_1.one(json);
7422
7424
  }
7423
7425
  static one(data, x, y, width, height) {