@leafer/miniapp 2.1.3 → 2.1.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.
@@ -433,7 +433,7 @@ const {sin: sin$6, cos: cos$6, acos: acos, sqrt: sqrt$5} = Math;
433
433
 
434
434
  const {float: float$6} = MathHelper;
435
435
 
436
- const tempPoint$5 = {};
436
+ const tempPoint$6 = {};
437
437
 
438
438
  function getWorld() {
439
439
  return Object.assign(Object.assign(Object.assign({}, getMatrixData()), getBoundsData()), {
@@ -492,8 +492,8 @@ const MatrixHelper = {
492
492
  to.f = t.f * pixelRatio;
493
493
  },
494
494
  scaleOfOuter(t, origin, scaleX, scaleY) {
495
- M$c.toInnerPoint(t, origin, tempPoint$5);
496
- M$c.scaleOfInner(t, tempPoint$5, scaleX, scaleY);
495
+ M$c.toInnerPoint(t, origin, tempPoint$6);
496
+ M$c.scaleOfInner(t, tempPoint$6, scaleX, scaleY);
497
497
  },
498
498
  scaleOfInner(t, origin, scaleX, scaleY = scaleX) {
499
499
  M$c.translateInner(t, origin.x, origin.y);
@@ -511,8 +511,8 @@ const MatrixHelper = {
511
511
  t.d = c * sinR + d * cosR;
512
512
  },
513
513
  rotateOfOuter(t, origin, rotation) {
514
- M$c.toInnerPoint(t, origin, tempPoint$5);
515
- M$c.rotateOfInner(t, tempPoint$5, rotation);
514
+ M$c.toInnerPoint(t, origin, tempPoint$6);
515
+ M$c.rotateOfInner(t, tempPoint$6, rotation);
516
516
  },
517
517
  rotateOfInner(t, origin, rotation) {
518
518
  M$c.translateInner(t, origin.x, origin.y);
@@ -533,8 +533,8 @@ const MatrixHelper = {
533
533
  }
534
534
  },
535
535
  skewOfOuter(t, origin, skewX, skewY) {
536
- M$c.toInnerPoint(t, origin, tempPoint$5);
537
- M$c.skewOfInner(t, tempPoint$5, skewX, skewY);
536
+ M$c.toInnerPoint(t, origin, tempPoint$6);
537
+ M$c.skewOfInner(t, tempPoint$6, skewX, skewY);
538
538
  },
539
539
  skewOfInner(t, origin, skewX, skewY = 0) {
540
540
  M$c.translateInner(t, origin.x, origin.y);
@@ -733,7 +733,7 @@ const M$c = MatrixHelper;
733
733
 
734
734
  const {float: float$5} = MathHelper;
735
735
 
736
- const {toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$3} = MatrixHelper;
736
+ const {toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$4} = MatrixHelper;
737
737
 
738
738
  const {sin: sin$5, cos: cos$5, abs: abs$b, sqrt: sqrt$4, atan2: atan2$2, min: min$3, round: round$5} = Math;
739
739
 
@@ -791,7 +791,7 @@ const PointHelper = {
791
791
  tempToOuterOf(t, matrix) {
792
792
  const {tempPoint: temp} = P$7;
793
793
  copy$c(temp, t);
794
- toOuterPoint$3(matrix, temp, temp);
794
+ toOuterPoint$4(matrix, temp, temp);
795
795
  return temp;
796
796
  },
797
797
  tempToInnerRadiusPointOf(t, matrix) {
@@ -815,7 +815,7 @@ const PointHelper = {
815
815
  toInnerPoint$2(matrix, t, to);
816
816
  },
817
817
  toOuterOf(t, matrix, to) {
818
- toOuterPoint$3(matrix, t, to);
818
+ toOuterPoint$4(matrix, t, to);
819
819
  },
820
820
  getCenter(t, to) {
821
821
  return {
@@ -956,7 +956,7 @@ class Point {
956
956
  }
957
957
  }
958
958
 
959
- const tempPoint$4 = new Point;
959
+ const tempPoint$5 = new Point;
960
960
 
961
961
  class Matrix {
962
962
  constructor(a, b, c, d, e, f) {
@@ -1225,7 +1225,7 @@ const AlignHelper = {
1225
1225
 
1226
1226
  const {tempPointBounds: tempPointBounds$1, setPoint: setPoint$5, addPoint: addPoint$3, toBounds: toBounds$3} = TwoPointBoundsHelper;
1227
1227
 
1228
- const {toOuterPoint: toOuterPoint$2} = MatrixHelper;
1228
+ const {toOuterPoint: toOuterPoint$3} = MatrixHelper;
1229
1229
 
1230
1230
  const {float: float$4, fourNumber: fourNumber$1} = MathHelper;
1231
1231
 
@@ -1339,16 +1339,16 @@ const BoundsHelper = {
1339
1339
  } else {
1340
1340
  point$2.x = t.x;
1341
1341
  point$2.y = t.y;
1342
- toOuterPoint$2(matrix, point$2, toPoint$5);
1342
+ toOuterPoint$3(matrix, point$2, toPoint$5);
1343
1343
  setPoint$5(tempPointBounds$1, toPoint$5.x, toPoint$5.y);
1344
1344
  point$2.x = t.x + t.width;
1345
- toOuterPoint$2(matrix, point$2, toPoint$5);
1345
+ toOuterPoint$3(matrix, point$2, toPoint$5);
1346
1346
  addPoint$3(tempPointBounds$1, toPoint$5.x, toPoint$5.y);
1347
1347
  point$2.y = t.y + t.height;
1348
- toOuterPoint$2(matrix, point$2, toPoint$5);
1348
+ toOuterPoint$3(matrix, point$2, toPoint$5);
1349
1349
  addPoint$3(tempPointBounds$1, toPoint$5.x, toPoint$5.y);
1350
1350
  point$2.x = t.x;
1351
- toOuterPoint$2(matrix, point$2, toPoint$5);
1351
+ toOuterPoint$3(matrix, point$2, toPoint$5);
1352
1352
  addPoint$3(tempPointBounds$1, toPoint$5.x, toPoint$5.y);
1353
1353
  toBounds$3(tempPointBounds$1, to);
1354
1354
  }
@@ -2708,7 +2708,7 @@ const {set: set$1, toNumberPoints: toNumberPoints$1} = PointHelper;
2708
2708
 
2709
2709
  const {M: M$b, L: L$b, C: C$9, Q: Q$7, Z: Z$9} = PathCommandMap;
2710
2710
 
2711
- const tempPoint$3 = {};
2711
+ const tempPoint$4 = {};
2712
2712
 
2713
2713
  const BezierHelper = {
2714
2714
  points(data, originPoints, curve, close) {
@@ -2879,8 +2879,8 @@ const BezierHelper = {
2879
2879
  addMode ? addPoint$2(pointBounds, fromX, fromY) : setPoint$4(pointBounds, fromX, fromY);
2880
2880
  addPoint$2(pointBounds, toX, toY);
2881
2881
  for (let i = 0, len = tList.length; i < len; i++) {
2882
- getPointAndSet(tList[i], fromX, fromY, x1, y1, x2, y2, toX, toY, tempPoint$3);
2883
- addPoint$2(pointBounds, tempPoint$3.x, tempPoint$3.y);
2882
+ getPointAndSet(tList[i], fromX, fromY, x1, y1, x2, y2, toX, toY, tempPoint$4);
2883
+ addPoint$2(pointBounds, tempPoint$4.x, tempPoint$4.y);
2884
2884
  }
2885
2885
  },
2886
2886
  getPointAndSet(t, fromX, fromY, x1, y1, x2, y2, toX, toY, setPoint) {
@@ -3048,7 +3048,8 @@ const PathConvert = {
3048
3048
  current.length = PathCommandLengthMap[char];
3049
3049
  current.index = 0;
3050
3050
  pushData(data, current.name);
3051
- if (char === "m") current.name = PathCommandMap["l"]; else if (char === "M") current.name = PathCommandMap["L"]; else if (!needConvert && convertCommand[char]) needConvert = true;
3051
+ if (char === "m") current.name = PathCommandMap["l"]; else if (char === "M") current.name = PathCommandMap["L"];
3052
+ if (!needConvert && convertCommand[char]) needConvert = true;
3052
3053
  } else {
3053
3054
  if (char === "-" || char === "+") {
3054
3055
  if (lastChar === "e" || lastChar === "E") {
@@ -3124,8 +3125,8 @@ const PathConvert = {
3124
3125
 
3125
3126
  case S$1:
3126
3127
  smooth = lastCommand === C$8 || lastCommand === S$1;
3127
- x1 = smooth ? x * 2 - controlX : old[i + 1];
3128
- y1 = smooth ? y * 2 - controlY : old[i + 2];
3128
+ x1 = smooth ? x * 2 - controlX : x;
3129
+ y1 = smooth ? y * 2 - controlY : y;
3129
3130
  controlX = old[i + 1];
3130
3131
  controlY = old[i + 2];
3131
3132
  x = old[i + 3];
@@ -3159,8 +3160,8 @@ const PathConvert = {
3159
3160
 
3160
3161
  case T:
3161
3162
  smooth = lastCommand === Q$6 || lastCommand === T;
3162
- controlX = smooth ? x * 2 - controlX : old[i + 1];
3163
- controlY = smooth ? y * 2 - controlY : old[i + 2];
3163
+ controlX = smooth ? x * 2 - controlX : x;
3164
+ controlY = smooth ? y * 2 - controlY : y;
3164
3165
  curveMode ? quadraticCurveTo$1(data, x, y, controlX, controlY, old[i + 1], old[i + 2]) : data.push(Q$6, controlX, controlY, old[i + 1], old[i + 2]);
3165
3166
  x = old[i + 1];
3166
3167
  y = old[i + 2];
@@ -4769,7 +4770,7 @@ function registerUIEvent() {
4769
4770
  };
4770
4771
  }
4771
4772
 
4772
- const {copy: copy$8, toInnerPoint: toInnerPoint$1, toOuterPoint: toOuterPoint$1, scaleOfOuter: scaleOfOuter$2, rotateOfOuter: rotateOfOuter$2, skewOfOuter: skewOfOuter, multiplyParent: multiplyParent$3, divideParent: divideParent, getLayout: getLayout} = MatrixHelper;
4773
+ const {copy: copy$8, toInnerPoint: toInnerPoint$1, toOuterPoint: toOuterPoint$2, scaleOfOuter: scaleOfOuter$2, rotateOfOuter: rotateOfOuter$2, skewOfOuter: skewOfOuter, multiplyParent: multiplyParent$3, divideParent: divideParent, getLayout: getLayout} = MatrixHelper;
4773
4774
 
4774
4775
  const matrix$3 = {}, {round: round$3} = Math;
4775
4776
 
@@ -4852,7 +4853,7 @@ const LeafHelper = {
4852
4853
  x: x,
4853
4854
  y: y
4854
4855
  };
4855
- isInnerPoint ? toOuterPoint$1(t.localTransform, local, local, true) : t.parent && toInnerPoint$1(t.parent.scrollWorldTransform, local, local, true);
4856
+ isInnerPoint ? toOuterPoint$2(t.localTransform, local, local, true) : t.parent && toInnerPoint$1(t.parent.scrollWorldTransform, local, local, true);
4856
4857
  L$5.moveLocal(t, local.x, local.y, transition);
4857
4858
  },
4858
4859
  moveLocal(t, x, y = 0, transition) {
@@ -4865,10 +4866,10 @@ const LeafHelper = {
4865
4866
  y: y
4866
4867
  }, transition) : (t.x = x, t.y = y);
4867
4868
  },
4868
- zoomOfWorld(t, origin, scaleX, scaleY, resize, transition) {
4869
- L$5.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
4869
+ zoomOfWorld(t, origin, scaleX, scaleY, resize, transition, boundsType) {
4870
+ L$5.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition, boundsType);
4870
4871
  },
4871
- zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition) {
4872
+ zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition, boundsType) {
4872
4873
  const o = t.__localMatrix;
4873
4874
  if (!isNumber(scaleY)) {
4874
4875
  if (scaleY) transition = scaleY;
@@ -4877,7 +4878,7 @@ const LeafHelper = {
4877
4878
  copy$8(matrix$3, o);
4878
4879
  scaleOfOuter$2(matrix$3, origin, scaleX, scaleY);
4879
4880
  if (L$5.hasHighPosition(t)) {
4880
- L$5.setTransform(t, matrix$3, resize, transition);
4881
+ L$5.setTransform(t, matrix$3, resize, transition, boundsType);
4881
4882
  } else {
4882
4883
  const x = t.x + matrix$3.e - o.e, y = t.y + matrix$3.f - o.f;
4883
4884
  if (transition && !resize) t.animate({
@@ -4885,7 +4886,7 @@ const LeafHelper = {
4885
4886
  y: y,
4886
4887
  scaleX: t.scaleX * scaleX,
4887
4888
  scaleY: t.scaleY * scaleY
4888
- }, transition); else t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true);
4889
+ }, transition); else t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true, boundsType);
4889
4890
  }
4890
4891
  },
4891
4892
  rotateOfWorld(t, origin, angle, transition) {
@@ -4909,18 +4910,18 @@ const LeafHelper = {
4909
4910
  skewOfOuter(matrix$3, origin, skewX, skewY);
4910
4911
  L$5.setTransform(t, matrix$3, resize, transition);
4911
4912
  },
4912
- transformWorld(t, transform, resize, transition) {
4913
+ transformWorld(t, transform, resize, transition, boundsType) {
4913
4914
  copy$8(matrix$3, t.worldTransform);
4914
4915
  multiplyParent$3(matrix$3, transform);
4915
4916
  if (t.parent) divideParent(matrix$3, t.parent.scrollWorldTransform);
4916
- L$5.setTransform(t, matrix$3, resize, transition);
4917
+ L$5.setTransform(t, matrix$3, resize, transition, boundsType);
4917
4918
  },
4918
- transform(t, transform, resize, transition) {
4919
+ transform(t, transform, resize, transition, boundsType) {
4919
4920
  copy$8(matrix$3, t.localTransform);
4920
4921
  multiplyParent$3(matrix$3, transform);
4921
- L$5.setTransform(t, matrix$3, resize, transition);
4922
+ L$5.setTransform(t, matrix$3, resize, transition, boundsType);
4922
4923
  },
4923
- setTransform(t, transform, resize, transition) {
4924
+ setTransform(t, transform, resize, transition, boundsType) {
4924
4925
  const data = t.__, originPoint = data.origin && L$5.getInnerOrigin(t, data.origin);
4925
4926
  const layout = getLayout(transform, originPoint, data.around && L$5.getInnerOrigin(t, data.around));
4926
4927
  if (L$5.hasOffset(t)) {
@@ -4936,7 +4937,7 @@ const LeafHelper = {
4936
4937
  PointHelper.move(layout, originPoint.x - changedPoint.x, originPoint.y - changedPoint.y);
4937
4938
  }
4938
4939
  t.set(layout);
4939
- t.scaleResize(scaleX, scaleY, false);
4940
+ t.scaleResize(scaleX, scaleY, false, boundsType);
4940
4941
  } else t.set(layout, transition);
4941
4942
  },
4942
4943
  getFlipTransform(t, axis) {
@@ -5146,12 +5147,12 @@ const BranchHelper = {
5146
5147
  w.height *= scaleY;
5147
5148
  w.scaleX *= scaleX;
5148
5149
  w.scaleY *= scaleY;
5149
- if (branch.isBranch) scale$3(branch, x, y, scaleX, scaleY, a, b);
5150
+ if (branch.isBranch) scale$4(branch, x, y, scaleX, scaleY, a, b);
5150
5151
  }
5151
5152
  }
5152
5153
  };
5153
5154
 
5154
- const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack, move: move$9, scale: scale$3} = BranchHelper;
5155
+ const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack, move: move$9, scale: scale$4} = BranchHelper;
5155
5156
 
5156
5157
  const WaitHelper = {
5157
5158
  run(wait) {
@@ -6027,7 +6028,7 @@ const LeafDataProxy = {
6027
6028
 
6028
6029
  const {setLayout: setLayout, multiplyParent: multiplyParent$2, translateInner: translateInner, defaultWorld: defaultWorld} = MatrixHelper;
6029
6030
 
6030
- const {toPoint: toPoint$4, tempPoint: tempPoint$2} = AroundHelper;
6031
+ const {toPoint: toPoint$4, tempPoint: tempPoint$3} = AroundHelper;
6031
6032
 
6032
6033
  const LeafMatrix = {
6033
6034
  __updateWorldMatrix() {
@@ -6048,8 +6049,8 @@ const LeafMatrix = {
6048
6049
  local.e = data.x + data.offsetX;
6049
6050
  local.f = data.y + data.offsetY;
6050
6051
  if (data.around || data.origin) {
6051
- toPoint$4(data.around || data.origin, layout.boxBounds, tempPoint$2);
6052
- translateInner(local, -tempPoint$2.x, -tempPoint$2.y, !data.around);
6052
+ toPoint$4(data.around || data.origin, layout.boxBounds, tempPoint$3);
6053
+ translateInner(local, -tempPoint$3.x, -tempPoint$3.y, !data.around);
6053
6054
  }
6054
6055
  }
6055
6056
  this.__layout.matrixChanged = undefined;
@@ -6281,7 +6282,7 @@ const {LEAF: LEAF, create: create} = IncrementId;
6281
6282
 
6282
6283
  const {stintSet: stintSet$6} = DataHelper;
6283
6284
 
6284
- const {toInnerPoint: toInnerPoint, toOuterPoint: toOuterPoint, multiplyParent: multiplyParent$1} = MatrixHelper;
6285
+ const {toInnerPoint: toInnerPoint, toOuterPoint: toOuterPoint$1, multiplyParent: multiplyParent$1} = MatrixHelper;
6285
6286
 
6286
6287
  const {toOuterOf: toOuterOf$1} = BoundsHelper;
6287
6288
 
@@ -6620,7 +6621,7 @@ let Leaf = class Leaf {
6620
6621
  toInnerPoint(this.worldTransform, world, to, distance);
6621
6622
  }
6622
6623
  innerToWorld(inner, to, distance, relative) {
6623
- toOuterPoint(this.worldTransform, inner, to, distance);
6624
+ toOuterPoint$1(this.worldTransform, inner, to, distance);
6624
6625
  if (relative) relative.worldToInner(to ? to : inner, null, distance);
6625
6626
  }
6626
6627
  getBoxPoint(world, relative, distance, change) {
@@ -6675,11 +6676,11 @@ let Leaf = class Leaf {
6675
6676
  const layer = this.leafer ? this.leafer.zoomLayer : this;
6676
6677
  return layer.getWorldPoint(page, relative, distance, change);
6677
6678
  }
6678
- setTransform(matrix, resize, transition) {
6679
- setTransform(this, matrix, resize, transition);
6679
+ setTransform(matrix, resize, transition, boundsType) {
6680
+ setTransform(this, matrix, resize, transition, boundsType);
6680
6681
  }
6681
- transform(matrix, resize, transition) {
6682
- transform(this, matrix, resize, transition);
6682
+ transform(matrix, resize, transition, boundsType) {
6683
+ transform(this, matrix, resize, transition, boundsType);
6683
6684
  }
6684
6685
  move(x, y, transition) {
6685
6686
  moveLocal(this, x, y, transition);
@@ -6687,8 +6688,8 @@ let Leaf = class Leaf {
6687
6688
  moveInner(x, y, transition) {
6688
6689
  moveWorld(this, x, y, true, transition);
6689
6690
  }
6690
- scaleOf(origin, scaleX, scaleY, resize, transition) {
6691
- zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition);
6691
+ scaleOf(origin, scaleX, scaleY, resize, transition, boundsType) {
6692
+ zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition, boundsType);
6692
6693
  }
6693
6694
  rotateOf(origin, rotation, transition) {
6694
6695
  rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition);
@@ -6696,14 +6697,14 @@ let Leaf = class Leaf {
6696
6697
  skewOf(origin, skewX, skewY, resize, transition) {
6697
6698
  skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition);
6698
6699
  }
6699
- transformWorld(worldTransform, resize, transition) {
6700
- transformWorld(this, worldTransform, resize, transition);
6700
+ transformWorld(worldTransform, resize, transition, boundsType) {
6701
+ transformWorld(this, worldTransform, resize, transition, boundsType);
6701
6702
  }
6702
6703
  moveWorld(x, y, transition) {
6703
6704
  moveWorld(this, x, y, false, transition);
6704
6705
  }
6705
- scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition) {
6706
- zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition);
6706
+ scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition, boundsType) {
6707
+ zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition, boundsType);
6707
6708
  }
6708
6709
  rotateOfWorld(worldOrigin, rotation) {
6709
6710
  rotateOfWorld(this, worldOrigin, rotation);
@@ -6714,7 +6715,7 @@ let Leaf = class Leaf {
6714
6715
  flip(axis, transition) {
6715
6716
  transform(this, getFlipTransform(this, axis), false, transition);
6716
6717
  }
6717
- scaleResize(scaleX, scaleY = scaleX, _noResize) {
6718
+ scaleResize(scaleX, scaleY = scaleX, _noResize, _boundsType) {
6718
6719
  this.scaleX *= scaleX;
6719
6720
  this.scaleY *= scaleY;
6720
6721
  }
@@ -7089,7 +7090,7 @@ class LeafLevelList {
7089
7090
  }
7090
7091
  }
7091
7092
 
7092
- const version = "2.1.3";
7093
+ const version = "2.1.4";
7093
7094
 
7094
7095
  class LeaferCanvas extends LeaferCanvasBase {
7095
7096
  get allowBackgroundColor() {
@@ -7905,7 +7906,7 @@ class Renderer {
7905
7906
 
7906
7907
  Renderer.clipSpread = 10;
7907
7908
 
7908
- const tempPoint$1 = {};
7909
+ const tempPoint$2 = {};
7909
7910
 
7910
7911
  const {copyRadiusPoint: copyRadiusPoint$1} = PointHelper;
7911
7912
 
@@ -8040,7 +8041,7 @@ class Picker {
8040
8041
  for (let i = len - 1; i > -1; i--) {
8041
8042
  child = children[i], data = child.__;
8042
8043
  if (!data.visible || hitMask && !data.mask) continue;
8043
- hit = hitRadiusPoint$1(child.__world, data.hitRadius ? copyRadiusPoint$1(tempPoint$1, point, data.hitRadius) : point);
8044
+ hit = hitRadiusPoint$1(child.__world, data.hitRadius ? copyRadiusPoint$1(tempPoint$2, point, data.hitRadius) : point);
8044
8045
  if (child.isBranch) {
8045
8046
  if (hit || child.__ignoreHitWorld) {
8046
8047
  if (child.isBranchLeaf && data.__clipAfterFill && !child.__hitWorld(point, true)) continue;
@@ -12376,7 +12377,7 @@ function layout$3(transform, box, x, y, scaleX, scaleY, rotation, skew) {
12376
12377
  translate(transform, box.x + x, box.y + y);
12377
12378
  }
12378
12379
 
12379
- const {get: get$1, scale: scale$2, copy: copy$4} = MatrixHelper;
12380
+ const {get: get$1, scale: scale$3, copy: copy$4} = MatrixHelper;
12380
12381
 
12381
12382
  const {getFloorScale: getFloorScale} = MathHelper, {abs: abs$7} = Math;
12382
12383
 
@@ -12414,7 +12415,7 @@ function createPattern(paint, ui, canvas, renderOptions) {
12414
12415
  scaleY *= getFloorScale(height + (yGap || 0));
12415
12416
  imageMatrix = get$1();
12416
12417
  if (transform) copy$4(imageMatrix, transform);
12417
- scale$2(imageMatrix, 1 / scaleX, 1 / scaleY);
12418
+ scale$3(imageMatrix, 1 / scaleX, 1 / scaleY);
12418
12419
  }
12419
12420
  const imageCanvas = image.getCanvas(width, height, opacity, undefined, xGap, yGap, ui.leafer && ui.leafer.config.smooth, data.interlace);
12420
12421
  if (brush) {
@@ -13513,10 +13514,11 @@ function mergeConfigAttr() {
13513
13514
  if (innerEditor) innerEditor.editConfig && Object.assign(mergeConfig, innerEditor.editConfig); else if (editTool) editTool.editConfig && Object.assign(mergeConfig, editTool.editConfig);
13514
13515
  if (element && element.editConfig) {
13515
13516
  let {editConfig: editConfig} = element;
13516
- if (editConfig.hover || editConfig.hoverStyle) {
13517
+ if (editConfig.hover || editConfig.hoverStyle || editConfig.hoverPathType) {
13517
13518
  editConfig = Object.assign({}, editConfig);
13518
13519
  delete editConfig.hover;
13519
13520
  delete editConfig.hoverStyle;
13521
+ delete editConfig.hoverPathType;
13520
13522
  }
13521
13523
  Object.assign(mergeConfig, editConfig);
13522
13524
  }
@@ -13584,9 +13586,22 @@ class Stroker extends UI {
13584
13586
  matrix$1.half = strokeWidth % 2;
13585
13587
  canvas.setWorld(matrix$1, options.matrix);
13586
13588
  canvas.beginPath();
13587
- if (this.strokePathType === "path") {
13589
+ switch (this.strokePathType) {
13590
+ case "box":
13591
+ const {boxBounds: boxBounds} = leaf.__layout;
13592
+ canvas.rect(boxBounds.x, boxBounds.y, boxBounds.width, boxBounds.height);
13593
+ break;
13594
+
13595
+ case "stroke":
13596
+ const {strokeBounds: strokeBounds} = leaf.__layout;
13597
+ canvas.rect(strokeBounds.x, strokeBounds.y, strokeBounds.width, strokeBounds.height);
13598
+ break;
13599
+
13600
+ case "path":
13588
13601
  leaf.__drawPath(canvas);
13589
- } else {
13602
+ break;
13603
+
13604
+ default:
13590
13605
  if (leaf.__.__useArrow) leaf.__drawPath(canvas); else leaf.__.__pathForRender ? leaf.__drawRenderPath(canvas) : leaf.__drawPathByBox(canvas);
13591
13606
  }
13592
13607
  data.strokeWidth = strokeWidth / Math.max(aScaleX, aScaleY);
@@ -13709,10 +13724,11 @@ class EditSelect extends Group {
13709
13724
  if (this.running && !this.dragging && !editor.dragging) {
13710
13725
  const {hoverTarget: hoverTarget, mergeConfig: mergeConfig} = editor, config = Object.assign({}, mergeConfig);
13711
13726
  if (hoverTarget && hoverTarget.editConfig) Object.assign(config, hoverTarget.editConfig);
13712
- const {stroke: stroke, strokeWidth: strokeWidth, hover: hover, hoverStyle: hoverStyle} = config;
13727
+ const {stroke: stroke, strokeWidth: strokeWidth, hover: hover, hoverStyle: hoverStyle, hoverPathType: hoverPathType} = config;
13713
13728
  this.hoverStroker.setTarget(hover ? hoverTarget : null, Object.assign({
13714
13729
  stroke: stroke,
13715
- strokeWidth: strokeWidth
13730
+ strokeWidth: strokeWidth,
13731
+ strokePathType: hoverPathType
13716
13732
  }, hoverStyle || {}));
13717
13733
  } else {
13718
13734
  this.hoverStroker.target = null;
@@ -13895,16 +13911,17 @@ const {topLeft: topLeft$1, top: top$1, topRight: topRight$1, right: right$2, bot
13895
13911
  const {toPoint: toPoint} = AroundHelper, {within: within$3, sign: sign$1} = MathHelper, {abs: abs$4} = Math;
13896
13912
 
13897
13913
  const EditDataHelper = {
13898
- getScaleData(target, startBounds, direction, totalMoveOrScale, lockRatio, around, flipable, scaleMode) {
13914
+ getScaleData(target, startBounds, direction, totalMoveOrScale, lockRatio, around, flipable, scaleMode, boundsType) {
13899
13915
  let align, origin = {}, scaleX = 1, scaleY = 1, lockScale;
13900
- const {boxBounds: boxBounds, widthRange: widthRange, heightRange: heightRange, dragBounds: dragBounds, worldBoxBounds: worldBoxBounds} = target;
13916
+ const {widthRange: widthRange, heightRange: heightRange, dragBounds: dragBounds, worldTransform: worldTransform, boxBounds: boxBounds} = target;
13901
13917
  const {width: width, height: height} = startBounds;
13918
+ const innerBounds = target.getBounds(boundsType, "inner");
13902
13919
  const originChangedScaleX = target.scaleX / startBounds.scaleX;
13903
13920
  const originChangedScaleY = target.scaleY / startBounds.scaleY;
13904
13921
  const signX = sign$1(originChangedScaleX);
13905
13922
  const signY = sign$1(originChangedScaleY);
13906
- const changedScaleX = scaleMode ? originChangedScaleX : signX * boxBounds.width / width;
13907
- const changedScaleY = scaleMode ? originChangedScaleY : signY * boxBounds.height / height;
13923
+ const changedScaleX = scaleMode ? originChangedScaleX : signX * innerBounds.width / width;
13924
+ const changedScaleY = scaleMode ? originChangedScaleY : signY * innerBounds.height / height;
13908
13925
  if (isNumber(totalMoveOrScale)) {
13909
13926
  scaleX = scaleY = Math.sqrt(totalMoveOrScale);
13910
13927
  } else {
@@ -13990,10 +14007,11 @@ const EditDataHelper = {
13990
14007
  if (useScaleY) scaleY /= changedScaleY;
13991
14008
  if (!flipable) {
13992
14009
  const {worldTransform: worldTransform} = target;
13993
- if (scaleX < 0) scaleX = 1 / boxBounds.width / worldTransform.scaleX;
13994
- if (scaleY < 0) scaleY = 1 / boxBounds.height / worldTransform.scaleY;
14010
+ if (scaleX < 0) scaleX = 1 / innerBounds.width / worldTransform.scaleX;
14011
+ if (scaleY < 0) scaleY = 1 / innerBounds.height / worldTransform.scaleY;
13995
14012
  }
13996
- toPoint(around || align, boxBounds, origin, true);
14013
+ toPoint(around || align, innerBounds, origin, true);
14014
+ this.checkOrigin(target, origin, boundsType);
13997
14015
  if (dragBounds) {
13998
14016
  const scaleData = {
13999
14017
  x: scaleX,
@@ -14004,15 +14022,20 @@ const EditDataHelper = {
14004
14022
  scaleY = scaleData.y;
14005
14023
  }
14006
14024
  if (useScaleX && widthRange) {
14007
- const nowWidth = boxBounds.width * target.scaleX;
14025
+ const nowWidth = innerBounds.width * target.scaleX;
14008
14026
  scaleX = within$3(nowWidth * scaleX, widthRange) / nowWidth;
14009
14027
  }
14010
14028
  if (useScaleY && heightRange) {
14011
- const nowHeight = boxBounds.height * target.scaleY;
14029
+ const nowHeight = innerBounds.height * target.scaleY;
14012
14030
  scaleY = within$3(nowHeight * scaleY, heightRange) / nowHeight;
14013
14031
  }
14014
- if (useScaleX && abs$4(scaleX * worldBoxBounds.width) < 1) scaleX = sign$1(scaleX) / worldBoxBounds.width;
14015
- if (useScaleY && abs$4(scaleY * worldBoxBounds.height) < 1) scaleY = sign$1(scaleY) / worldBoxBounds.height;
14032
+ let minWidth = 1 * abs$4(worldTransform.scaleX), minHeight = 1 * abs$4(worldTransform.scaleY);
14033
+ if (boundsType !== "box") {
14034
+ minWidth += innerBounds.width - boxBounds.width;
14035
+ minHeight += innerBounds.height - boxBounds.height;
14036
+ }
14037
+ if (useScaleX && abs$4(scaleX * innerBounds.width) < minWidth) scaleX = sign$1(scaleX) * minWidth / innerBounds.width;
14038
+ if (useScaleY && abs$4(scaleY * innerBounds.height) < minHeight) scaleY = sign$1(scaleY) * minHeight / innerBounds.height;
14016
14039
  if (lockRatio && scaleX !== scaleY) {
14017
14040
  lockScale = Math.min(abs$4(scaleX), abs$4(scaleY));
14018
14041
  scaleX = sign$1(scaleX) * lockScale;
@@ -14029,7 +14052,7 @@ const EditDataHelper = {
14029
14052
  around: around
14030
14053
  };
14031
14054
  },
14032
- getRotateData(target, direction, current, last, around) {
14055
+ getRotateData(target, direction, current, last, around, boundsType) {
14033
14056
  let align, origin = {};
14034
14057
  switch (direction) {
14035
14058
  case topLeft$1:
@@ -14051,13 +14074,14 @@ const EditDataHelper = {
14051
14074
  default:
14052
14075
  align = "center";
14053
14076
  }
14054
- toPoint(around || align, target.boxBounds, origin, true);
14077
+ toPoint(around || align, target.getBounds(boundsType, "inner"), origin, true);
14078
+ this.checkOrigin(target, origin, boundsType);
14055
14079
  return {
14056
14080
  origin: origin,
14057
14081
  rotation: PointHelper.getRotation(last, target.getWorldPointByBox(origin), current)
14058
14082
  };
14059
14083
  },
14060
- getSkewData(bounds, direction, move, around) {
14084
+ getSkewData(target, direction, move, around, boundsType) {
14061
14085
  let align, origin = {}, skewX = 0, skewY = 0;
14062
14086
  let last;
14063
14087
  switch (direction) {
@@ -14100,10 +14124,12 @@ const EditDataHelper = {
14100
14124
  align = "left";
14101
14125
  skewY = 1;
14102
14126
  }
14103
- const {width: width, height: height} = bounds;
14127
+ const innerBounds = target.getBounds(boundsType, "inner");
14128
+ const {width: width, height: height} = innerBounds;
14104
14129
  last.x = last.x * width;
14105
14130
  last.y = last.y * height;
14106
- toPoint(around || align, bounds, origin, true);
14131
+ toPoint(around || align, innerBounds, origin, true);
14132
+ this.checkOrigin(target, origin, boundsType);
14107
14133
  const rotation = PointHelper.getRotation(last, origin, {
14108
14134
  x: last.x + (skewX ? move.x : 0),
14109
14135
  y: last.y + (skewY ? move.y : 0)
@@ -14115,6 +14141,13 @@ const EditDataHelper = {
14115
14141
  skewY: skewY
14116
14142
  };
14117
14143
  },
14144
+ checkOrigin(target, origin, boundsType) {
14145
+ if (boundsType !== "box") {
14146
+ const {boxBounds: boxBounds} = target, innerBounds = target.getBounds(boundsType, "inner");
14147
+ origin.x += innerBounds.x - boxBounds.x;
14148
+ origin.y += innerBounds.y - boxBounds.y;
14149
+ }
14150
+ },
14118
14151
  getAround(around, altKey) {
14119
14152
  return altKey && !around ? "center" : around;
14120
14153
  },
@@ -14385,8 +14418,8 @@ class EditBox extends Group {
14385
14418
  updateMoveCursor(this);
14386
14419
  }
14387
14420
  update() {
14388
- const {editor: editor} = this;
14389
- const {x: x, y: y, scaleX: scaleX, scaleY: scaleY, rotation: rotation, skewX: skewX, skewY: skewY, width: width, height: height} = this.target.getLayoutBounds("box", editor, true);
14421
+ const {editor: editor, mergeConfig: mergeConfig} = this;
14422
+ const {x: x, y: y, scaleX: scaleX, scaleY: scaleY, rotation: rotation, skewX: skewX, skewY: skewY, width: width, height: height} = this.target.getLayoutBounds(mergeConfig.editBoxType, editor, true);
14390
14423
  this.visible = !this.target.locked;
14391
14424
  this.set({
14392
14425
  x: x,
@@ -14409,9 +14442,9 @@ class EditBox extends Group {
14409
14442
  if (this.app) this.rect.syncEventer = this.app.interaction.bottomList = null;
14410
14443
  }
14411
14444
  updateBounds(bounds) {
14412
- const {editor: editor, mergeConfig: mergeConfig, single: single, rect: rect, circle: circle, buttons: buttons, resizePoints: resizePoints, rotatePoints: rotatePoints, resizeLines: resizeLines} = this;
14445
+ const {editor: editor, mergedConfig: mergedConfig, single: single, rect: rect, circle: circle, buttons: buttons, resizePoints: resizePoints, rotatePoints: rotatePoints, resizeLines: resizeLines} = this;
14413
14446
  const {editMask: editMask} = editor;
14414
- const {middlePoint: middlePoint, resizeable: resizeable, rotateable: rotateable, hideOnSmall: hideOnSmall, editBox: editBox, mask: mask, dimOthers: dimOthers, bright: bright, spread: spread, hideRotatePoints: hideRotatePoints, hideResizeLines: hideResizeLines} = mergeConfig;
14447
+ const {middlePoint: middlePoint, resizeable: resizeable, rotateable: rotateable, hideOnSmall: hideOnSmall, editBox: editBox, mask: mask, dimOthers: dimOthers, bright: bright, spread: spread, hideRotatePoints: hideRotatePoints, hideResizeLines: hideResizeLines} = mergedConfig;
14415
14448
  editMask.visible = mask ? true : 0;
14416
14449
  if (!isUndefined(dimOthers) || !isUndefined(bright)) {
14417
14450
  editor.setDimOthers(dimOthers);
@@ -14449,7 +14482,7 @@ class EditBox extends Group {
14449
14482
  }
14450
14483
  }
14451
14484
  }
14452
- circle.visible = showPoints && rotateable && !!(mergeConfig.circle || mergeConfig.rotatePoint);
14485
+ circle.visible = showPoints && rotateable && !!(mergedConfig.circle || mergedConfig.rotatePoint);
14453
14486
  if (circle.visible) this.layoutCircle();
14454
14487
  if (rect.path) rect.path = null;
14455
14488
  rect.set(Object.assign(Object.assign({}, bounds), {
@@ -14557,7 +14590,8 @@ class EditBox extends Group {
14557
14590
  this.dragPoint = null;
14558
14591
  }
14559
14592
  onTransformStart(e) {
14560
- if (this.moving || this.gesturing) this.editor.opacity = this.mergedConfig.hideOnMove ? 0 : 1;
14593
+ const {hideOnMove: hideOnMove, editBoxType: editBoxType} = this.mergedConfig;
14594
+ if (this.moving || this.gesturing) this.editor.opacity = hideOnMove ? 0 : 1;
14561
14595
  if (this.resizing) ResizeEvent.resizingKeys = this.editor.leafList.keys;
14562
14596
  const {dragStartData: dragStartData, target: target} = this;
14563
14597
  dragStartData.x = e.x;
@@ -14567,7 +14601,7 @@ class EditBox extends Group {
14567
14601
  x: target.x,
14568
14602
  y: target.y
14569
14603
  };
14570
- dragStartData.bounds = Object.assign({}, target.getLayoutBounds("box", "local"));
14604
+ dragStartData.bounds = Object.assign({}, target.getLayoutBounds(editBoxType, "local"));
14571
14605
  dragStartData.rotation = target.rotation;
14572
14606
  }
14573
14607
  onTransformEnd(e) {
@@ -14805,6 +14839,7 @@ const config$1 = {
14805
14839
  },
14806
14840
  selector: true,
14807
14841
  editBox: true,
14842
+ editBoxType: "box",
14808
14843
  hover: true,
14809
14844
  select: "press",
14810
14845
  openInner: "double",
@@ -15129,7 +15164,7 @@ class TransformTool {
15129
15164
  }
15130
15165
  onScale(e) {
15131
15166
  const {target: target, mergeConfig: mergeConfig, single: single, dragStartData: dragStartData} = this.editBox;
15132
- let {around: around, lockRatio: lockRatio, flipable: flipable, editSize: editSize} = mergeConfig, totalMove;
15167
+ let {around: around, lockRatio: lockRatio, flipable: flipable, editSize: editSize, editBoxType: editBoxType} = mergeConfig, totalMove;
15133
15168
  if (e instanceof ZoomEvent) {
15134
15169
  if (!around) around = target.getBoxPoint(e);
15135
15170
  totalMove = e.totalScale;
@@ -15138,7 +15173,7 @@ class TransformTool {
15138
15173
  }
15139
15174
  const {direction: direction} = e.current;
15140
15175
  if (e.shiftKey || target.lockRatio) lockRatio = true;
15141
- const data = EditDataHelper.getScaleData(target, dragStartData.bounds, direction, totalMove, lockRatio, EditDataHelper.getAround(around, e.altKey), flipable, !single || editSize === "scale");
15176
+ const data = EditDataHelper.getScaleData(target, dragStartData.bounds, direction, totalMove, lockRatio, EditDataHelper.getAround(around, e.altKey), flipable, !single || editSize === "scale", editBoxType);
15142
15177
  const targetX = target.x, targetY = target.y;
15143
15178
  if (e instanceof DragEvent && this.editTool && this.editTool.onScaleWithDrag) {
15144
15179
  data.drag = e;
@@ -15150,7 +15185,7 @@ class TransformTool {
15150
15185
  }
15151
15186
  onRotate(e) {
15152
15187
  const {target: target, mergeConfig: mergeConfig, dragStartData: dragStartData} = this.editBox;
15153
- const {around: around, rotateAround: rotateAround, rotateGap: rotateGap, diagonalRotateKey: diagonalRotateKey} = mergeConfig;
15188
+ const {around: around, rotateAround: rotateAround, rotateGap: rotateGap, diagonalRotateKey: diagonalRotateKey, editBoxType: editBoxType} = mergeConfig;
15154
15189
  const {direction: direction} = e.current;
15155
15190
  let origin, rotation;
15156
15191
  if (e instanceof RotateEvent) {
@@ -15158,7 +15193,7 @@ class TransformTool {
15158
15193
  origin = rotateAround ? AroundHelper.getPoint(rotateAround, target.boxBounds) : target.getBoxPoint(e);
15159
15194
  } else {
15160
15195
  const isDiagonalRotate = diagonalRotateKey ? e.isHoldKeys(diagonalRotateKey) : e.shiftKey;
15161
- const data = EditDataHelper.getRotateData(target, direction, e, dragStartData, isDiagonalRotate ? null : rotateAround || target.around || target.origin || around || "center");
15196
+ const data = EditDataHelper.getRotateData(target, direction, e, dragStartData, isDiagonalRotate ? null : rotateAround || target.around || target.origin || around || "center", editBoxType);
15162
15197
  rotation = dragStartData.rotation + data.rotation - target.rotation;
15163
15198
  origin = data.origin;
15164
15199
  }
@@ -15170,8 +15205,8 @@ class TransformTool {
15170
15205
  }
15171
15206
  onSkew(e) {
15172
15207
  const {target: target, mergeConfig: mergeConfig} = this.editBox;
15173
- const {around: around} = mergeConfig;
15174
- const {origin: origin, skewX: skewX, skewY: skewY} = EditDataHelper.getSkewData(target.boxBounds, e.current.direction, e.getInnerMove(target), EditDataHelper.getAround(around, e.altKey));
15208
+ const {around: around, editBoxType: editBoxType} = mergeConfig;
15209
+ const {origin: origin, skewX: skewX, skewY: skewY} = EditDataHelper.getSkewData(target, e.current.direction, e.getInnerMove(target), EditDataHelper.getAround(around, e.altKey), editBoxType);
15175
15210
  if (!skewX && !skewY) return;
15176
15211
  this.skewOf(origin, skewX, skewY);
15177
15212
  }
@@ -15232,7 +15267,7 @@ class TransformTool {
15232
15267
  scaleOf(origin, scaleX, scaleY = scaleX, _resize) {
15233
15268
  if (!this.checkTransform("resizeable")) return;
15234
15269
  const {target: target, mergeConfig: mergeConfig, single: single, editor: editor} = this.editBox;
15235
- const {beforeScale: beforeScale} = mergeConfig;
15270
+ const {beforeScale: beforeScale, editBoxType: editBoxType} = mergeConfig;
15236
15271
  if (beforeScale) {
15237
15272
  const check = beforeScale({
15238
15273
  target: target,
@@ -15250,7 +15285,8 @@ class TransformTool {
15250
15285
  worldOrigin: worldOrigin,
15251
15286
  scaleX: scaleX,
15252
15287
  scaleY: scaleY,
15253
- transform: transform
15288
+ transform: transform,
15289
+ editBoxType: editBoxType
15254
15290
  };
15255
15291
  this.emitEvent(new EditorScaleEvent(EditorScaleEvent.BEFORE_SCALE, data));
15256
15292
  const event = new EditorScaleEvent(EditorScaleEvent.SCALE, data);
@@ -15278,7 +15314,7 @@ class TransformTool {
15278
15314
  rotateOf(origin, rotation) {
15279
15315
  if (!this.checkTransform("rotateable")) return;
15280
15316
  const {target: target, mergeConfig: mergeConfig, single: single, editor: editor} = this.editBox;
15281
- const {beforeRotate: beforeRotate} = mergeConfig;
15317
+ const {beforeRotate: beforeRotate, editBoxType: editBoxType} = mergeConfig;
15282
15318
  if (beforeRotate) {
15283
15319
  const check = beforeRotate({
15284
15320
  target: target,
@@ -15294,7 +15330,8 @@ class TransformTool {
15294
15330
  editor: editor,
15295
15331
  worldOrigin: worldOrigin,
15296
15332
  rotation: rotation,
15297
- transform: transform
15333
+ transform: transform,
15334
+ editBoxType: editBoxType
15298
15335
  };
15299
15336
  this.emitEvent(new EditorRotateEvent(EditorRotateEvent.BEFORE_ROTATE, data));
15300
15337
  const event = new EditorRotateEvent(EditorRotateEvent.ROTATE, data);
@@ -15304,7 +15341,7 @@ class TransformTool {
15304
15341
  skewOf(origin, skewX, skewY = 0, _resize) {
15305
15342
  if (!this.checkTransform("skewable")) return;
15306
15343
  const {target: target, mergeConfig: mergeConfig, single: single, editor: editor} = this.editBox;
15307
- const {beforeSkew: beforeSkew} = mergeConfig;
15344
+ const {beforeSkew: beforeSkew, editBoxType: editBoxType} = mergeConfig;
15308
15345
  if (beforeSkew) {
15309
15346
  const check = beforeSkew({
15310
15347
  target: target,
@@ -15322,7 +15359,8 @@ class TransformTool {
15322
15359
  worldOrigin: worldOrigin,
15323
15360
  skewX: skewX,
15324
15361
  skewY: skewY,
15325
- transform: transform
15362
+ transform: transform,
15363
+ editBoxType: editBoxType
15326
15364
  };
15327
15365
  this.emitEvent(new EditorSkewEvent(EditorSkewEvent.BEFORE_SKEW, data));
15328
15366
  const event = new EditorSkewEvent(EditorSkewEvent.SKEW, data);
@@ -15771,32 +15809,32 @@ let EditTool = class EditTool extends InnerEditor {
15771
15809
  app.unlockLayout();
15772
15810
  }
15773
15811
  onScale(e) {
15774
- const {scaleX: scaleX, scaleY: scaleY, transform: transform, worldOrigin: worldOrigin, editor: editor} = e;
15812
+ const {scaleX: scaleX, scaleY: scaleY, transform: transform, worldOrigin: worldOrigin, editor: editor, editBoxType: editBoxType} = e;
15775
15813
  const {app: app, list: list} = editor;
15776
15814
  app.lockLayout();
15777
15815
  list.forEach(target => {
15778
15816
  const resize = editor.getEditSize(target) !== "scale";
15779
- if (transform) target.transformWorld(transform, resize); else target.scaleOfWorld(worldOrigin, scaleX, scaleY, resize);
15817
+ if (transform) target.transformWorld(transform, resize, false, editBoxType); else target.scaleOfWorld(worldOrigin, scaleX, scaleY, resize, false, editBoxType);
15780
15818
  });
15781
15819
  app.unlockLayout();
15782
15820
  }
15783
15821
  onRotate(e) {
15784
- const {rotation: rotation, transform: transform, worldOrigin: worldOrigin, editor: editor} = e;
15822
+ const {rotation: rotation, transform: transform, worldOrigin: worldOrigin, editor: editor, editBoxType: editBoxType} = e;
15785
15823
  const {app: app, list: list} = editor;
15786
15824
  app.lockLayout();
15787
15825
  list.forEach(target => {
15788
15826
  const resize = editor.getEditSize(target) !== "scale";
15789
- if (transform) target.transformWorld(transform, resize); else target.rotateOfWorld(worldOrigin, rotation);
15827
+ if (transform) target.transformWorld(transform, resize, false, editBoxType); else target.rotateOfWorld(worldOrigin, rotation);
15790
15828
  });
15791
15829
  app.unlockLayout();
15792
15830
  }
15793
15831
  onSkew(e) {
15794
- const {skewX: skewX, skewY: skewY, transform: transform, worldOrigin: worldOrigin, editor: editor} = e;
15832
+ const {skewX: skewX, skewY: skewY, transform: transform, worldOrigin: worldOrigin, editor: editor, editBoxType: editBoxType} = e;
15795
15833
  const {app: app, list: list} = editor;
15796
15834
  app.lockLayout();
15797
15835
  list.forEach(target => {
15798
15836
  const resize = editor.getEditSize(target) !== "scale";
15799
- if (transform) target.transformWorld(transform, resize); else target.skewOfWorld(worldOrigin, skewX, skewY, resize);
15837
+ if (transform) target.transformWorld(transform, resize, false, editBoxType); else target.skewOfWorld(worldOrigin, skewX, skewY, resize);
15800
15838
  });
15801
15839
  app.unlockLayout();
15802
15840
  }
@@ -16093,16 +16131,27 @@ function scaleResizeGroup(group, scaleX, scaleY) {
16093
16131
  }
16094
16132
  }
16095
16133
 
16096
- const leaf = Leaf.prototype;
16134
+ const leaf = Leaf.prototype, tempPoint$1 = {}, {scale: scale$2, toOuterPoint: toOuterPoint} = MatrixHelper;
16097
16135
 
16098
- leaf.scaleResize = function(scaleX, scaleY = scaleX, noResize) {
16136
+ leaf.scaleResize = function(scaleX, scaleY = scaleX, noResize, boundsType) {
16099
16137
  const data = this;
16100
16138
  if (noResize || data.editConfig && data.editConfig.editSize === "scale") {
16101
16139
  data.scaleX *= scaleX;
16102
16140
  data.scaleY *= scaleY;
16103
16141
  } else {
16104
- if (scaleX < 0) data.scaleX *= -1, scaleX = -scaleX;
16105
- if (scaleY < 0) data.scaleY *= -1, scaleY = -scaleY;
16142
+ const local = this.__localMatrix;
16143
+ if (scaleX < 0) data.scaleX *= -1, scaleX = -scaleX, scale$2(local, -1, 1);
16144
+ if (scaleY < 0) data.scaleY *= -1, scaleY = -scaleY, scale$2(local, 1, -1);
16145
+ if (boundsType === "stroke") {
16146
+ const {boxBounds: boxBounds, strokeBounds: strokeBounds} = this.__layout, {x: x, y: y, width: width, height: height} = strokeBounds;
16147
+ tempPoint$1.x = (x - boxBounds.x) * (scaleX - 1);
16148
+ tempPoint$1.y = (y - boxBounds.y) * (scaleY - 1);
16149
+ toOuterPoint(local, tempPoint$1, tempPoint$1, true);
16150
+ this.x += tempPoint$1.x;
16151
+ this.y += tempPoint$1.y;
16152
+ scaleX = (width * scaleX - (width - boxBounds.width)) / boxBounds.width;
16153
+ scaleY = (height * scaleY - (height - boxBounds.height)) / boxBounds.height;
16154
+ }
16106
16155
  this.__scaleResize(scaleX, scaleY);
16107
16156
  }
16108
16157
  };
@@ -21137,4 +21186,4 @@ function isSame(a, b) {
21137
21186
 
21138
21187
  Plugin.add("corner");
21139
21188
 
21140
- export { AlignHelper, Animate, AnimateEasing, AnimateEvent, AnimateList, Answer, App, AroundHelper, Arrow, ArrowData, AutoBounds, BezierHelper, Bounds, BoundsEvent, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragBoundsHelper, DragEvent, Dragger, DropEvent, EditBox, EditDataHelper, EditPoint, EditSelect, EditSelectHelper, EditTool, EditToolCreator, Editor, EditorEvent, EditorGroupEvent, EditorHelper, EditorMoveEvent, EditorRotateEvent, EditorScaleEvent, EditorSkewEvent, Effect, Ellipse, EllipseBox, EllipseBoxData, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Filter, Finder, Flow, FourNumberHelper, Frame, FrameData, Group, GroupData, HighBezierHelper, HighCurveHelper, HitCanvasManager, Image, ImageBox, ImageBoxData, ImageData, ImageEvent, ImageManager, IncrementId, InnerEditor, InnerEditorEvent, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferFilm, LeaferImage, LeaferTypeCreator, LeaferVideo, Line, LineData, LineEditTool, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, MyDragEvent, MyImage, MyPointerEvent, MyTouchEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathArrowModule, PathBounds, PathBox, PathBoxData, PathCommandDataHelper, PathCommandMap, PathCommandNodeHelper, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathMatrixHelper, PathNodeHandleType, PathNumberCommandLengthMap, PathNumberCommandMap, PathScaler, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonBox, PolygonBoxData, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Resource, Robot, RobotData, RotateEvent, Run, ScrollBar, Scroller, SelectArea, Selector, Star, StarBox, StarBoxData, StarData, State, StringNumberMap, Stroker, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, TouchEvent, TransformTool, Transformer, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, UnitConvertHelper, WaitHelper, WatchEvent, Watcher, WheelEventHelper, ZoomEvent, addViewport, addViewportConfig, affectRenderBoundsType, affectStrokeBoundsType, arrowType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, createAttr, createDescriptor, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, dimType, doBoundsType, doStrokeType, effectType, emptyData, eraserType, extraPropertyEventMap, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isArray, isData, isEmptyData, isFinite$1 as isFinite, isNull, isNumber, isObject, isString, isUndefined, layoutProcessor, leaferTransformAttrMap, maskType, motionPathType, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerEditTool, registerInnerEditor, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleResize, scaleResizeFontSize, scaleResizeGroup, scaleResizePath, scaleResizePoints, scaleType, scrollType, sortType, stateStyleType, stateType, strokeType, surfaceType, tempBounds$3 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$4 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };
21189
+ export { AlignHelper, Animate, AnimateEasing, AnimateEvent, AnimateList, Answer, App, AroundHelper, Arrow, ArrowData, AutoBounds, BezierHelper, Bounds, BoundsEvent, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragBoundsHelper, DragEvent, Dragger, DropEvent, EditBox, EditDataHelper, EditPoint, EditSelect, EditSelectHelper, EditTool, EditToolCreator, Editor, EditorEvent, EditorGroupEvent, EditorHelper, EditorMoveEvent, EditorRotateEvent, EditorScaleEvent, EditorSkewEvent, Effect, Ellipse, EllipseBox, EllipseBoxData, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Filter, Finder, Flow, FourNumberHelper, Frame, FrameData, Group, GroupData, HighBezierHelper, HighCurveHelper, HitCanvasManager, Image, ImageBox, ImageBoxData, ImageData, ImageEvent, ImageManager, IncrementId, InnerEditor, InnerEditorEvent, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferFilm, LeaferImage, LeaferTypeCreator, LeaferVideo, Line, LineData, LineEditTool, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, MyDragEvent, MyImage, MyPointerEvent, MyTouchEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathArrowModule, PathBounds, PathBox, PathBoxData, PathCommandDataHelper, PathCommandMap, PathCommandNodeHelper, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathMatrixHelper, PathNodeHandleType, PathNumberCommandLengthMap, PathNumberCommandMap, PathScaler, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonBox, PolygonBoxData, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Resource, Robot, RobotData, RotateEvent, Run, ScrollBar, Scroller, SelectArea, Selector, Star, StarBox, StarBoxData, StarData, State, StringNumberMap, Stroker, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, TouchEvent, TransformTool, Transformer, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, UnitConvertHelper, WaitHelper, WatchEvent, Watcher, WheelEventHelper, ZoomEvent, addViewport, addViewportConfig, affectRenderBoundsType, affectStrokeBoundsType, arrowType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, createAttr, createDescriptor, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, dimType, doBoundsType, doStrokeType, effectType, emptyData, eraserType, extraPropertyEventMap, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isArray, isData, isEmptyData, isFinite$1 as isFinite, isNull, isNumber, isObject, isString, isUndefined, layoutProcessor, leaferTransformAttrMap, maskType, motionPathType, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerEditTool, registerInnerEditor, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleResize, scaleResizeFontSize, scaleResizeGroup, scaleResizePath, scaleResizePoints, scaleType, scrollType, sortType, stateStyleType, stateType, strokeType, surfaceType, tempBounds$3 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$5 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };