leafer-ui 2.1.6 → 2.1.7

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
@@ -268,7 +268,7 @@ var LeaferUI = function(exports) {
268
268
  return to;
269
269
  },
270
270
  setTemp(top, right, bottom, left) {
271
- return set$2(tempFour, top, right, bottom, left);
271
+ return set$3(tempFour, top, right, bottom, left);
272
272
  },
273
273
  toTempAB(a, b, change) {
274
274
  tempTo = change ? isNumber(a) ? b : a : [];
@@ -308,21 +308,21 @@ var LeaferUI = function(exports) {
308
308
  max(t, other, change) {
309
309
  if (isNumber(t) && isNumber(other)) return max$5(t, other);
310
310
  toTempAB(t, other, change);
311
- return set$2(tempTo, max$5(tempA[0], tempB[0]), max$5(tempA[1], tempB[1]), max$5(tempA[2], tempB[2]), max$5(tempA[3], tempB[3]));
311
+ return set$3(tempTo, max$5(tempA[0], tempB[0]), max$5(tempA[1], tempB[1]), max$5(tempA[2], tempB[2]), max$5(tempA[3], tempB[3]));
312
312
  },
313
313
  add(t, other, change) {
314
314
  if (isNumber(t) && isNumber(other)) return t + other;
315
315
  toTempAB(t, other, change);
316
- return set$2(tempTo, tempA[0] + tempB[0], tempA[1] + tempB[1], tempA[2] + tempB[2], tempA[3] + tempB[3]);
316
+ return set$3(tempTo, tempA[0] + tempB[0], tempA[1] + tempB[1], tempA[2] + tempB[2], tempA[3] + tempB[3]);
317
317
  },
318
318
  swapAndScale(t, scaleX, scaleY, change) {
319
319
  if (isNumber(t)) return scaleX === scaleY ? t * scaleX : [ t * scaleY, t * scaleX ];
320
320
  const to = change ? t : [];
321
321
  const [top, right, bottom, left] = t.length === 4 ? t : get$5(t);
322
- return set$2(to, bottom * scaleY, left * scaleX, top * scaleY, right * scaleX);
322
+ return set$3(to, bottom * scaleY, left * scaleX, top * scaleY, right * scaleX);
323
323
  }
324
324
  };
325
- const {set: set$2, get: get$5, setTemp: setTemp, toTempAB: toTempAB} = FourNumberHelper;
325
+ const {set: set$3, get: get$5, setTemp: setTemp, toTempAB: toTempAB} = FourNumberHelper;
326
326
  const {round: round$3, pow: pow$1, max: max$4, floor: floor$2, PI: PI$3} = Math;
327
327
  const tempScaleData$1 = {};
328
328
  const MathHelper = {
@@ -434,7 +434,7 @@ var LeaferUI = function(exports) {
434
434
  }
435
435
  const {sin: sin$5, cos: cos$5, acos: acos, sqrt: sqrt$3} = Math;
436
436
  const {float: float$3} = MathHelper;
437
- const tempPoint$4 = {};
437
+ const tempPoint$5 = {};
438
438
  function getWorld() {
439
439
  return Object.assign(Object.assign(Object.assign({}, getMatrixData()), getBoundsData()), {
440
440
  scaleX: 1,
@@ -491,8 +491,8 @@ var LeaferUI = function(exports) {
491
491
  to.f = t.f * pixelRatio;
492
492
  },
493
493
  scaleOfOuter(t, origin, scaleX, scaleY) {
494
- M$6.toInnerPoint(t, origin, tempPoint$4);
495
- M$6.scaleOfInner(t, tempPoint$4, scaleX, scaleY);
494
+ M$6.toInnerPoint(t, origin, tempPoint$5);
495
+ M$6.scaleOfInner(t, tempPoint$5, scaleX, scaleY);
496
496
  },
497
497
  scaleOfInner(t, origin, scaleX, scaleY = scaleX) {
498
498
  M$6.translateInner(t, origin.x, origin.y);
@@ -510,8 +510,8 @@ var LeaferUI = function(exports) {
510
510
  t.d = c * sinR + d * cosR;
511
511
  },
512
512
  rotateOfOuter(t, origin, rotation) {
513
- M$6.toInnerPoint(t, origin, tempPoint$4);
514
- M$6.rotateOfInner(t, tempPoint$4, rotation);
513
+ M$6.toInnerPoint(t, origin, tempPoint$5);
514
+ M$6.rotateOfInner(t, tempPoint$5, rotation);
515
515
  },
516
516
  rotateOfInner(t, origin, rotation) {
517
517
  M$6.translateInner(t, origin.x, origin.y);
@@ -532,8 +532,8 @@ var LeaferUI = function(exports) {
532
532
  }
533
533
  },
534
534
  skewOfOuter(t, origin, skewX, skewY) {
535
- M$6.toInnerPoint(t, origin, tempPoint$4);
536
- M$6.skewOfInner(t, tempPoint$4, skewX, skewY);
535
+ M$6.toInnerPoint(t, origin, tempPoint$5);
536
+ M$6.skewOfInner(t, tempPoint$5, skewX, skewY);
537
537
  },
538
538
  skewOfInner(t, origin, skewX, skewY = 0) {
539
539
  M$6.translateInner(t, origin.x, origin.y);
@@ -730,7 +730,7 @@ var LeaferUI = function(exports) {
730
730
  const M$6 = MatrixHelper;
731
731
  const {float: float$2} = MathHelper;
732
732
  const {toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$3} = MatrixHelper;
733
- const {sin: sin$4, cos: cos$4, abs: abs$5, sqrt: sqrt$2, atan2: atan2$2, min: min$2, round: round$2} = Math;
733
+ const {sin: sin$4, cos: cos$4, abs: abs$6, sqrt: sqrt$2, atan2: atan2$2, min: min$2, round: round$2} = Math;
734
734
  const PointHelper = {
735
735
  defaultPoint: getPointData(),
736
736
  tempPoint: {},
@@ -766,15 +766,15 @@ var LeaferUI = function(exports) {
766
766
  t.x += (t.x - origin.x) * (scaleX - 1);
767
767
  t.y += (t.y - origin.y) * (scaleY - 1);
768
768
  },
769
- rotate(t, rotation, origin) {
769
+ rotate(t, rotation, origin, radiusX = 1, radiusY = 1) {
770
770
  if (!origin) origin = P$5.defaultPoint;
771
771
  rotation *= OneRadian;
772
772
  const cosR = cos$4(rotation);
773
773
  const sinR = sin$4(rotation);
774
- const rx = t.x - origin.x;
775
- const ry = t.y - origin.y;
776
- t.x = origin.x + rx * cosR - ry * sinR;
777
- t.y = origin.y + rx * sinR + ry * cosR;
774
+ const rx = (t.x - origin.x) / radiusX;
775
+ const ry = (t.y - origin.y) / radiusY;
776
+ t.x = origin.x + (rx * cosR - ry * sinR) * radiusX;
777
+ t.y = origin.y + (rx * sinR + ry * cosR) * radiusY;
778
778
  },
779
779
  tempToInnerOf(t, matrix) {
780
780
  const {tempPoint: temp} = P$5;
@@ -827,15 +827,15 @@ var LeaferUI = function(exports) {
827
827
  return getDistanceFrom(t.x, t.y, point.x, point.y);
828
828
  },
829
829
  getDistanceFrom(x1, y1, x2, y2) {
830
- const x = abs$5(x2 - x1);
831
- const y = abs$5(y2 - y1);
830
+ const x = abs$6(x2 - x1);
831
+ const y = abs$6(y2 - y1);
832
832
  return sqrt$2(x * x + y * y);
833
833
  },
834
834
  getMinDistanceFrom(x1, y1, x2, y2, x3, y3) {
835
835
  return min$2(getDistanceFrom(x1, y1, x2, y2), getDistanceFrom(x2, y2, x3, y3));
836
836
  },
837
- getAngle(t, to) {
838
- return getAtan2(t, to) / OneRadian;
837
+ getAngle(t, to, radiusX, radiusY) {
838
+ return getAtan2(t, to, radiusX, radiusY) / OneRadian;
839
839
  },
840
840
  getRotation(t, origin, to, toOrigin) {
841
841
  if (!toOrigin) toOrigin = origin;
@@ -849,8 +849,8 @@ var LeaferUI = function(exports) {
849
849
  const d = toY - toOriginY;
850
850
  return Math.atan2(a * d - b * c, a * c + b * d);
851
851
  },
852
- getAtan2(t, to) {
853
- return atan2$2(to.y - t.y, to.x - t.x);
852
+ getAtan2(t, to, radiusX = 1, radiusY = 1) {
853
+ return atan2$2((to.y - t.y) / radiusY, (to.x - t.x) / radiusX);
854
854
  },
855
855
  getDistancePoint(t, to, distance, changeTo, fromTo) {
856
856
  const r = getAtan2(t, to);
@@ -946,7 +946,7 @@ var LeaferUI = function(exports) {
946
946
  return this;
947
947
  }
948
948
  }
949
- const tempPoint$3 = new Point;
949
+ const tempPoint$4 = new Point;
950
950
  class Matrix {
951
951
  constructor(a, b, c, d, e, f) {
952
952
  this.set(a, b, c, d, e, f);
@@ -2520,11 +2520,11 @@ var LeaferUI = function(exports) {
2520
2520
  data[0] ? drawer.arcTo(x, y, right, y, data[0]) : drawer.lineTo(x, y);
2521
2521
  }
2522
2522
  };
2523
- const {sin: sin$3, cos: cos$3, hypot: hypot, atan2: atan2$1, ceil: ceil, abs: abs$4, PI: PI$2, sqrt: sqrt$1, pow: pow} = Math;
2523
+ const {sin: sin$3, cos: cos$3, hypot: hypot, atan2: atan2$1, ceil: ceil, abs: abs$5, PI: PI$2, sqrt: sqrt$1, pow: pow} = Math;
2524
2524
  const {setPoint: setPoint$1, addPoint: addPoint$1} = TwoPointBoundsHelper;
2525
- const {set: set$1, toNumberPoints: toNumberPoints} = PointHelper;
2525
+ const {set: set$2, toNumberPoints: toNumberPoints} = PointHelper;
2526
2526
  const {M: M$5, L: L$6, C: C$4, Q: Q$4, Z: Z$5} = PathCommandMap;
2527
- const tempPoint$2 = {};
2527
+ const tempPoint$3 = {};
2528
2528
  const BezierHelper = {
2529
2529
  points(data, originPoints, curve, close) {
2530
2530
  let points = toNumberPoints(originPoints);
@@ -2592,14 +2592,14 @@ var LeaferUI = function(exports) {
2592
2592
  const lenCB = hypot(CBx, CBy);
2593
2593
  let totalRadian = endRadian - startRadian;
2594
2594
  if (totalRadian < 0) totalRadian += PI2;
2595
- if (lenBA < 1e-12 || lenCB < 1e-12 || totalRadian < 1e-12 || abs$4(totalRadian - PI$2) < 1e-12) {
2595
+ if (lenBA < 1e-12 || lenCB < 1e-12 || totalRadian < 1e-12 || abs$5(totalRadian - PI$2) < 1e-12) {
2596
2596
  if (data) data.push(L$6, x1, y1);
2597
2597
  if (setPointBounds) {
2598
2598
  setPoint$1(setPointBounds, fromX, fromY);
2599
2599
  addPoint$1(setPointBounds, x1, y1);
2600
2600
  }
2601
- if (setStartPoint) set$1(setStartPoint, fromX, fromY);
2602
- if (setEndPoint) set$1(setEndPoint, x1, y1);
2601
+ if (setStartPoint) set$2(setStartPoint, fromX, fromY);
2602
+ if (setEndPoint) set$2(setEndPoint, x1, y1);
2603
2603
  return;
2604
2604
  }
2605
2605
  const anticlockwise = BAx * CBy - CBx * BAy < 0;
@@ -2625,7 +2625,7 @@ var LeaferUI = function(exports) {
2625
2625
  let totalRadian = endRadian - startRadian;
2626
2626
  if (totalRadian < 0) totalRadian += PI2; else if (totalRadian > PI2) totalRadian -= PI2;
2627
2627
  if (anticlockwise) totalRadian -= PI2;
2628
- const parts = ceil(abs$4(totalRadian / PI_2));
2628
+ const parts = ceil(abs$5(totalRadian / PI_2));
2629
2629
  const partRadian = totalRadian / parts;
2630
2630
  const partRadian4Sin = sin$3(partRadian / 4);
2631
2631
  const control = 8 / 3 * partRadian4Sin * partRadian4Sin / sin$3(partRadian / 2);
@@ -2639,7 +2639,7 @@ var LeaferUI = function(exports) {
2639
2639
  let fromX = cx + x, fromY = cy + y;
2640
2640
  if (data) data.push(data.length ? L$6 : M$5, fromX, fromY);
2641
2641
  if (setPointBounds) setPoint$1(setPointBounds, fromX, fromY);
2642
- if (setStartPoint) set$1(setStartPoint, fromX, fromY);
2642
+ if (setStartPoint) set$2(setStartPoint, fromX, fromY);
2643
2643
  for (let i = 0; i < parts; i++) {
2644
2644
  endCos = cos$3(endRadian);
2645
2645
  endSin = sin$3(endRadian);
@@ -2658,7 +2658,7 @@ var LeaferUI = function(exports) {
2658
2658
  startRadian = endRadian;
2659
2659
  endRadian += partRadian;
2660
2660
  }
2661
- if (setEndPoint) set$1(setEndPoint, cx + x, cy + y);
2661
+ if (setEndPoint) set$2(setEndPoint, cx + x, cy + y);
2662
2662
  },
2663
2663
  quadraticCurveTo(data, fromX, fromY, x1, y1, toX, toY) {
2664
2664
  data.push(C$4, (fromX + 2 * x1) / 3, (fromY + 2 * y1) / 3, (toX + 2 * x1) / 3, (toY + 2 * y1) / 3, toX, toY);
@@ -2694,8 +2694,8 @@ var LeaferUI = function(exports) {
2694
2694
  addMode ? addPoint$1(pointBounds, fromX, fromY) : setPoint$1(pointBounds, fromX, fromY);
2695
2695
  addPoint$1(pointBounds, toX, toY);
2696
2696
  for (let i = 0, len = tList.length; i < len; i++) {
2697
- getPointAndSet(tList[i], fromX, fromY, x1, y1, x2, y2, toX, toY, tempPoint$2);
2698
- addPoint$1(pointBounds, tempPoint$2.x, tempPoint$2.y);
2697
+ getPointAndSet(tList[i], fromX, fromY, x1, y1, x2, y2, toX, toY, tempPoint$3);
2698
+ addPoint$1(pointBounds, tempPoint$3.x, tempPoint$3.y);
2699
2699
  }
2700
2700
  },
2701
2701
  getPointAndSet(t, fromX, fromY, x1, y1, x2, y2, toX, toY, setPoint) {
@@ -3119,7 +3119,7 @@ var LeaferUI = function(exports) {
3119
3119
  const {current: current, pushData: pushData, copyData: copyData} = PathConvert;
3120
3120
  const {M: M$3, L: L$4, C: C$2, Q: Q$2, Z: Z$3, N: N$2, D: D$3, X: X$2, G: G$2, F: F$3, O: O$2, P: P$2, U: U$2} = PathCommandMap;
3121
3121
  const {getMinDistanceFrom: getMinDistanceFrom, getRadianFrom: getRadianFrom} = PointHelper;
3122
- const {tan: tan, min: min$1, abs: abs$3} = Math;
3122
+ const {tan: tan, min: min$1, abs: abs$4} = Math;
3123
3123
  const startPoint = {};
3124
3124
  const PathCommandDataHelper = {
3125
3125
  beginPath(data) {
@@ -3177,7 +3177,7 @@ var LeaferUI = function(exports) {
3177
3177
  arcTo(data, x1, y1, x2, y2, radius, lastX, lastY, fullRadius) {
3178
3178
  if (!isUndefined(lastX)) {
3179
3179
  const r = getMinDistanceFrom(lastX, lastY, x1, y1, x2, y2) / (fullRadius ? 1 : 2);
3180
- radius = min$1(radius, min$1(r, r * abs$3(tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2))));
3180
+ radius = min$1(radius, min$1(r, r * abs$4(tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2))));
3181
3181
  }
3182
3182
  data.push(U$2, x1, y1, x2, y2, radius);
3183
3183
  },
@@ -5649,7 +5649,7 @@ var LeaferUI = function(exports) {
5649
5649
  }
5650
5650
  };
5651
5651
  const {setLayout: setLayout, multiplyParent: multiplyParent$2, translateInner: translateInner, defaultWorld: defaultWorld} = MatrixHelper;
5652
- const {toPoint: toPoint$3, tempPoint: tempPoint$1} = AroundHelper;
5652
+ const {toPoint: toPoint$3, tempPoint: tempPoint$2} = AroundHelper;
5653
5653
  const LeafMatrix = {
5654
5654
  __updateWorldMatrix() {
5655
5655
  const {parent: parent, __layout: __layout, __world: __world, __scrollWorld: __scrollWorld, __: __} = this;
@@ -5669,8 +5669,8 @@ var LeaferUI = function(exports) {
5669
5669
  local.e = data.x + data.offsetX;
5670
5670
  local.f = data.y + data.offsetY;
5671
5671
  if (data.around || data.origin) {
5672
- toPoint$3(data.around || data.origin, layout.boxBounds, tempPoint$1);
5673
- translateInner(local, -tempPoint$1.x, -tempPoint$1.y, !data.around);
5672
+ toPoint$3(data.around || data.origin, layout.boxBounds, tempPoint$2);
5673
+ translateInner(local, -tempPoint$2.x, -tempPoint$2.y, !data.around);
5674
5674
  }
5675
5675
  }
5676
5676
  this.__layout.matrixChanged = undefined;
@@ -6567,7 +6567,7 @@ var LeaferUI = function(exports) {
6567
6567
  this.levelMap = null;
6568
6568
  }
6569
6569
  }
6570
- const version = "2.1.6";
6570
+ const version = "2.1.7";
6571
6571
  const debug$5 = Debug.get("LeaferCanvas");
6572
6572
  class LeaferCanvas extends LeaferCanvasBase {
6573
6573
  set zIndex(zIndex) {
@@ -7390,7 +7390,7 @@ var LeaferUI = function(exports) {
7390
7390
  }
7391
7391
  }
7392
7392
  Renderer.clipSpread = 10;
7393
- const tempPoint = {};
7393
+ const tempPoint$1 = {};
7394
7394
  const {copyRadiusPoint: copyRadiusPoint$1} = PointHelper;
7395
7395
  const {hitRadiusPoint: hitRadiusPoint$1} = BoundsHelper;
7396
7396
  class Picker {
@@ -7522,7 +7522,7 @@ var LeaferUI = function(exports) {
7522
7522
  for (let i = len - 1; i > -1; i--) {
7523
7523
  child = children[i], data = child.__;
7524
7524
  if (!data.visible || hitMask && !data.mask) continue;
7525
- hit = hitRadiusPoint$1(child.__world, data.hitRadius ? copyRadiusPoint$1(tempPoint, point, data.hitRadius) : point);
7525
+ hit = hitRadiusPoint$1(child.__world, data.hitRadius ? copyRadiusPoint$1(tempPoint$1, point, data.hitRadius) : point);
7526
7526
  if (child.isBranch) {
7527
7527
  if (hit || child.__ignoreHitWorld) {
7528
7528
  if (child.isBranchLeaf && data.__clipAfterFill && !child.__hitWorld(point, true)) continue;
@@ -8246,6 +8246,7 @@ var LeaferUI = function(exports) {
8246
8246
  this.set(keyframe);
8247
8247
  return Plugin.need("animate");
8248
8248
  }
8249
+ killAnimate(_type, _nextStyle) {}
8249
8250
  export(_filename, _options) {
8250
8251
  return Plugin.need("export");
8251
8252
  }
@@ -8893,31 +8894,52 @@ var LeaferUI = function(exports) {
8893
8894
  __decorate([ surfaceType("#FFFFFF") ], exports.Frame.prototype, "fill", void 0);
8894
8895
  __decorate([ affectRenderBoundsType("hide") ], exports.Frame.prototype, "overflow", void 0);
8895
8896
  exports.Frame = __decorate([ registerUI() ], exports.Frame);
8896
- const {moveTo: moveTo$3, closePath: closePath$2, ellipse: ellipse} = PathCommandDataHelper;
8897
+ const {moveTo: moveTo$3, closePath: closePath$2, ellipse: ellipse} = PathCommandDataHelper, {tempPoint: tempPoint, set: set$1, rotate: rotate$2} = PointHelper, {abs: abs$3} = Math, tempCenter = {};
8897
8898
  exports.Ellipse = class Ellipse extends exports.UI {
8898
8899
  get __tag() {
8899
8900
  return "Ellipse";
8900
8901
  }
8901
8902
  __updatePath() {
8902
- const data = this.__, {width: width, height: height, innerRadius: innerRadius, startAngle: startAngle, endAngle: endAngle} = data;
8903
+ const data = this.__, {width: width, height: height, innerRadius: innerRadius, startAngle: startAngle, endAngle: endAngle, closed: closed} = data;
8903
8904
  const rx = width / 2, ry = height / 2;
8904
8905
  const path = data.path = [];
8905
- let open;
8906
+ let open, hasAngle, closedAngle;
8907
+ if (startAngle || endAngle) hasAngle = true;
8908
+ if (hasAngle) closedAngle = abs$3(endAngle - startAngle) === 360;
8906
8909
  if (innerRadius) {
8907
- if (startAngle || endAngle) {
8908
- if (innerRadius < 1) ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle, false); else open = true;
8909
- ellipse(path, rx, ry, rx, ry, 0, endAngle, startAngle, true);
8910
+ const drawInnerEllipse = innerRadius < 1 || closed;
8911
+ let outerStartAngle = startAngle, outerEndAngle = endAngle, outerAnticlockwise;
8912
+ if (hasAngle) {
8913
+ if (drawInnerEllipse) {
8914
+ ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle);
8915
+ if (closedAngle) {
8916
+ set$1(tempPoint, width, ry);
8917
+ set$1(tempCenter, rx, ry);
8918
+ rotate$2(tempPoint, endAngle, tempCenter, rx, ry);
8919
+ moveTo$3(path, tempPoint.x, tempPoint.y);
8920
+ }
8921
+ outerStartAngle = endAngle;
8922
+ outerEndAngle = startAngle;
8923
+ outerAnticlockwise = true;
8924
+ } else {
8925
+ if (!closedAngle) open = true;
8926
+ }
8910
8927
  } else {
8911
- if (innerRadius < 1) {
8928
+ if (drawInnerEllipse) {
8912
8929
  ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius);
8930
+ closePath$2(path);
8913
8931
  moveTo$3(path, width, ry);
8932
+ outerStartAngle = 360;
8933
+ outerAnticlockwise = true;
8934
+ } else {
8935
+ outerEndAngle = 360;
8914
8936
  }
8915
- ellipse(path, rx, ry, rx, ry, 0, 360, 0, true);
8916
8937
  }
8938
+ ellipse(path, rx, ry, rx, ry, 0, outerStartAngle, outerEndAngle, outerAnticlockwise);
8917
8939
  } else {
8918
- if (startAngle || endAngle) {
8919
- moveTo$3(path, rx, ry);
8920
- ellipse(path, rx, ry, rx, ry, 0, startAngle, endAngle, false);
8940
+ if (hasAngle) {
8941
+ if (!closedAngle) moveTo$3(path, rx, ry);
8942
+ ellipse(path, rx, ry, rx, ry, 0, startAngle, endAngle);
8921
8943
  } else {
8922
8944
  ellipse(path, rx, ry, rx, ry);
8923
8945
  }
@@ -11392,6 +11414,7 @@ var LeaferUI = function(exports) {
11392
11414
  if (data.__autoSide) {
11393
11415
  ui.forceUpdate("width");
11394
11416
  LeafHelper.updateBounds(ui);
11417
+ ui.__layout.boundsChanged = true;
11395
11418
  if (ui.__proxyData) {
11396
11419
  ui.setProxyAttr("width", data.width);
11397
11420
  ui.setProxyAttr("height", data.height);
@@ -11399,7 +11422,7 @@ var LeaferUI = function(exports) {
11399
11422
  needUpdate = false;
11400
11423
  }
11401
11424
  }
11402
- if (paint.mode === "brush") PaintImage.brush(leafPaint, ui, attrName);
11425
+ if (paint.mode === "brush") PaintImage.brush(ui, attrName, leafPaint);
11403
11426
  if (!leafPaint.data) {
11404
11427
  PaintImage.createData(leafPaint, image, paint, boxBounds);
11405
11428
  const {transform: transform} = leafPaint.data, {opacity: opacity} = paint;
@@ -12727,7 +12750,7 @@ var LeaferUI = function(exports) {
12727
12750
  exports.surfaceType = surfaceType;
12728
12751
  exports.tempBounds = tempBounds$2;
12729
12752
  exports.tempMatrix = tempMatrix$2;
12730
- exports.tempPoint = tempPoint$3;
12753
+ exports.tempPoint = tempPoint$4;
12731
12754
  exports.tryToNumber = tryToNumber;
12732
12755
  exports.useCanvas = useCanvas;
12733
12756
  exports.useModule = useModule;