@leafer-game/worker 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.
@@ -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:
3126
3127
  smooth = lastCommand === C$4 || lastCommand === S;
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$3 || 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$3, controlX, controlY, old[i + 1], old[i + 2]);
3165
3166
  x = old[i + 1];
3166
3167
  y = old[i + 2];
@@ -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$1.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
4869
+ zoomOfWorld(t, origin, scaleX, scaleY, resize, transition, boundsType) {
4870
+ L$1.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$5(matrix$1, o);
4878
4879
  scaleOfOuter$2(matrix$1, origin, scaleX, scaleY);
4879
4880
  if (L$1.hasHighPosition(t)) {
4880
- L$1.setTransform(t, matrix$1, resize, transition);
4881
+ L$1.setTransform(t, matrix$1, resize, transition, boundsType);
4881
4882
  } else {
4882
4883
  const x = t.x + matrix$1.e - o.e, y = t.y + matrix$1.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$1, origin, skewX, skewY);
4910
4911
  L$1.setTransform(t, matrix$1, resize, transition);
4911
4912
  },
4912
- transformWorld(t, transform, resize, transition) {
4913
+ transformWorld(t, transform, resize, transition, boundsType) {
4913
4914
  copy$5(matrix$1, t.worldTransform);
4914
4915
  multiplyParent$3(matrix$1, transform);
4915
4916
  if (t.parent) divideParent(matrix$1, t.parent.scrollWorldTransform);
4916
- L$1.setTransform(t, matrix$1, resize, transition);
4917
+ L$1.setTransform(t, matrix$1, resize, transition, boundsType);
4917
4918
  },
4918
- transform(t, transform, resize, transition) {
4919
+ transform(t, transform, resize, transition, boundsType) {
4919
4920
  copy$5(matrix$1, t.localTransform);
4920
4921
  multiplyParent$3(matrix$1, transform);
4921
- L$1.setTransform(t, matrix$1, resize, transition);
4922
+ L$1.setTransform(t, matrix$1, 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$1.getInnerOrigin(t, data.origin);
4925
4926
  const layout = getLayout(transform, originPoint, data.around && L$1.getInnerOrigin(t, data.around));
4926
4927
  if (L$1.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) {
@@ -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() {