@leafer/worker 2.1.4 → 2.1.5

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.
@@ -260,7 +260,7 @@ const IncrementId = {
260
260
  RUNTIME: "runtime",
261
261
  LEAF: "leaf",
262
262
  TASK: "task",
263
- CNAVAS: "canvas",
263
+ CANVAS: "canvas",
264
264
  IMAGE: "image",
265
265
  types: {},
266
266
  create(typeName) {
@@ -914,7 +914,7 @@ const PointHelper = {
914
914
  return quick ? t.x === point.x && t.y === point.y : float$5(t.x) === float$5(point.x) && float$5(t.y) === float$5(point.y);
915
915
  },
916
916
  reset(t) {
917
- P$7.reset(t);
917
+ t.x = t.y = 0;
918
918
  }
919
919
  };
920
920
 
@@ -1123,6 +1123,7 @@ class Matrix {
1123
1123
  }
1124
1124
  reset() {
1125
1125
  MatrixHelper.reset(this);
1126
+ return this;
1126
1127
  }
1127
1128
  }
1128
1129
 
@@ -2346,7 +2347,7 @@ class LeaferCanvasBase extends Canvas$1 {
2346
2347
  this.worldTransform = {};
2347
2348
  if (!config) config = minSize;
2348
2349
  this.manager = manager;
2349
- this.innerId = IncrementId.create(IncrementId.CNAVAS);
2350
+ this.innerId = IncrementId.create(IncrementId.CANVAS);
2350
2351
  const {width: width, height: height, pixelRatio: pixelRatio} = config;
2351
2352
  this.autoLayout = !width || !height;
2352
2353
  this.size.pixelRatio = pixelRatio || Platform.devicePixelRatio;
@@ -2496,6 +2497,7 @@ class LeaferCanvasBase extends Canvas$1 {
2496
2497
  }
2497
2498
  useGrayscaleAlpha(bounds) {
2498
2499
  this.setTempPixelBounds(bounds, true, true);
2500
+ if (!tempPixelBounds.width || !tempPixelBounds.height) return;
2499
2501
  let alpha, pixel;
2500
2502
  const {context: context} = this, imageData = context.getImageData(tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height), {data: data} = imageData;
2501
2503
  for (let i = 0, len = data.length; i < len; i += 4) {
@@ -2794,10 +2796,10 @@ const BezierHelper = {
2794
2796
  const centerY = y1 + c * sin$4(startRadian + totalRadian / 2 + PI_2 * sign);
2795
2797
  startRadian -= PI_2 * sign;
2796
2798
  endRadian -= PI_2 * sign;
2797
- return ellipse$8(data, centerX, centerY, radius, radius, 0, startRadian / OneRadian, endRadian / OneRadian, anticlockwise, setPointBounds, setEndPoint, setStartPoint);
2799
+ return ellipse$7(data, centerX, centerY, radius, radius, 0, startRadian / OneRadian, endRadian / OneRadian, anticlockwise, setPointBounds, setEndPoint, setStartPoint);
2798
2800
  },
2799
2801
  arc(data, x, y, radius, startAngle, endAngle, anticlockwise, setPointBounds, setEndPoint, setStartPoint) {
2800
- return ellipse$8(data, x, y, radius, radius, 0, startAngle, endAngle, anticlockwise, setPointBounds, setEndPoint, setStartPoint);
2802
+ return ellipse$7(data, x, y, radius, radius, 0, startAngle, endAngle, anticlockwise, setPointBounds, setEndPoint, setStartPoint);
2801
2803
  },
2802
2804
  ellipse(data, cx, cy, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise, setPointBounds, setEndPoint, setStartPoint) {
2803
2805
  const rotationRadian = rotation * OneRadian;
@@ -2925,11 +2927,11 @@ const BezierHelper = {
2925
2927
  }
2926
2928
  };
2927
2929
 
2928
- const {getPointAndSet: getPointAndSet, toTwoPointBounds: toTwoPointBounds$1, ellipse: ellipse$8} = BezierHelper;
2930
+ const {getPointAndSet: getPointAndSet, toTwoPointBounds: toTwoPointBounds$1, ellipse: ellipse$7} = BezierHelper;
2929
2931
 
2930
2932
  const {sin: sin$3, cos: cos$3, sqrt: sqrt$2, atan2: atan2} = Math;
2931
2933
 
2932
- const {ellipse: ellipse$7} = BezierHelper;
2934
+ const {ellipse: ellipse$6} = BezierHelper;
2933
2935
 
2934
2936
  const EllipseHelper = {
2935
2937
  ellipticalArc(data, fromX, fromY, radiusX, radiusY, rotation, largeFlag, sweepFlag, toX, toY, curveMode) {
@@ -2967,7 +2969,7 @@ const EllipseHelper = {
2967
2969
  const centerY = fromY + halfY + rotationSin * cx + rotationCos * cy;
2968
2970
  const anticlockwise = totalRadian < 0 ? 1 : 0;
2969
2971
  if (curveMode || Platform.ellipseToCurve) {
2970
- ellipse$7(data, centerX, centerY, radiusX, radiusY, rotation, startRadian / OneRadian, endRadian / OneRadian, anticlockwise);
2972
+ ellipse$6(data, centerX, centerY, radiusX, radiusY, rotation, startRadian / OneRadian, endRadian / OneRadian, anticlockwise);
2971
2973
  } else {
2972
2974
  if (radiusX === radiusY && !rotation) {
2973
2975
  data.push(PathCommandMap.O, centerX, centerY, radiusX, startRadian / OneRadian, endRadian / OneRadian, anticlockwise);
@@ -2989,7 +2991,7 @@ const PathCommandNodeHelper = {
2989
2991
 
2990
2992
  const {M: M$a, m: m, L: L$a, l: l, H: H, h: h, V: V, v: v, C: C$8, c: c, S: S$1, s: s, Q: Q$6, q: q, T: T, t: t, A: A, a: a, Z: Z$8, z: z, N: N$5, D: D$6, X: X$5, G: G$5, F: F$6, O: O$6, P: P$5, U: U$5} = PathCommandMap;
2991
2993
 
2992
- const {rect: rect$3, roundRect: roundRect$2, arcTo: arcTo$4, arc: arc$3, ellipse: ellipse$6, quadraticCurveTo: quadraticCurveTo$1} = BezierHelper;
2994
+ const {rect: rect$3, roundRect: roundRect$2, arcTo: arcTo$4, arc: arc$3, ellipse: ellipse$5, quadraticCurveTo: quadraticCurveTo$1} = BezierHelper;
2993
2995
 
2994
2996
  const {ellipticalArc: ellipticalArc} = EllipseHelper;
2995
2997
 
@@ -3225,14 +3227,14 @@ const PathConvert = {
3225
3227
  break;
3226
3228
 
3227
3229
  case G$5:
3228
- ellipse$6(curveMode ? data : copyData(data, old, i, 9), old[i + 1], old[i + 2], old[i + 3], old[i + 4], old[i + 5], old[i + 6], old[i + 7], old[i + 8], null, setEndPoint$1);
3230
+ ellipse$5(curveMode ? data : copyData(data, old, i, 9), old[i + 1], old[i + 2], old[i + 3], old[i + 4], old[i + 5], old[i + 6], old[i + 7], old[i + 8], null, setEndPoint$1);
3229
3231
  x = setEndPoint$1.x;
3230
3232
  y = setEndPoint$1.y;
3231
3233
  i += 9;
3232
3234
  break;
3233
3235
 
3234
3236
  case F$6:
3235
- curveMode ? ellipse$6(data, old[i + 1], old[i + 2], old[i + 3], old[i + 4], 0, 0, 360, false) : copyData(data, old, i, 5);
3237
+ curveMode ? ellipse$5(data, old[i + 1], old[i + 2], old[i + 3], old[i + 4], 0, 0, 360, false) : copyData(data, old, i, 5);
3236
3238
  x = old[i + 1] + old[i + 3];
3237
3239
  y = old[i + 2];
3238
3240
  i += 5;
@@ -3386,7 +3388,7 @@ const PathCommandDataHelper = {
3386
3388
  drawEllipse(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
3387
3389
  BezierHelper.ellipse(null, x, y, radiusX, radiusY, isNull(rotation) ? 0 : rotation, isNull(startAngle) ? 0 : startAngle, isNull(endAngle) ? 360 : endAngle, anticlockwise, null, null, startPoint);
3388
3390
  data.push(M$9, startPoint.x, startPoint.y);
3389
- ellipse$5(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
3391
+ ellipse$4(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
3390
3392
  },
3391
3393
  drawArc(data, x, y, radius, startAngle, endAngle, anticlockwise) {
3392
3394
  BezierHelper.arc(null, x, y, radius, isNull(startAngle) ? 0 : startAngle, isNull(endAngle) ? 360 : endAngle, anticlockwise, null, null, startPoint);
@@ -3398,9 +3400,9 @@ const PathCommandDataHelper = {
3398
3400
  }
3399
3401
  };
3400
3402
 
3401
- const {ellipse: ellipse$5, arc: arc$2} = PathCommandDataHelper;
3403
+ const {ellipse: ellipse$4, arc: arc$2} = PathCommandDataHelper;
3402
3404
 
3403
- const {moveTo: moveTo$4, lineTo: lineTo$3, quadraticCurveTo: quadraticCurveTo, bezierCurveTo: bezierCurveTo, closePath: closePath$3, beginPath: beginPath, rect: rect$2, roundRect: roundRect$1, ellipse: ellipse$4, arc: arc$1, arcTo: arcTo$3, drawEllipse: drawEllipse, drawArc: drawArc, drawPoints: drawPoints$2} = PathCommandDataHelper;
3405
+ const {moveTo: moveTo$4, lineTo: lineTo$3, quadraticCurveTo: quadraticCurveTo, bezierCurveTo: bezierCurveTo, closePath: closePath$3, beginPath: beginPath, rect: rect$2, roundRect: roundRect$1, ellipse: ellipse$3, arc: arc$1, arcTo: arcTo$3, drawEllipse: drawEllipse, drawArc: drawArc, drawPoints: drawPoints$2} = PathCommandDataHelper;
3404
3406
 
3405
3407
  class PathCreator {
3406
3408
  set path(value) {
@@ -3457,7 +3459,7 @@ class PathCreator {
3457
3459
  return this;
3458
3460
  }
3459
3461
  ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
3460
- ellipse$4(this.__path, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
3462
+ ellipse$3(this.__path, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
3461
3463
  this.paint();
3462
3464
  return this;
3463
3465
  }
@@ -3579,7 +3581,7 @@ const PathDrawer = {
3579
3581
 
3580
3582
  const {M: M$7, L: L$7, C: C$5, Q: Q$3, Z: Z$5, N: N$2, D: D$3, X: X$2, G: G$2, F: F$3, O: O$3, P: P$2, U: U$2} = PathCommandMap;
3581
3583
 
3582
- const {toTwoPointBounds: toTwoPointBounds, toTwoPointBoundsByQuadraticCurve: toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$2, arc: arc, ellipse: ellipse$3} = BezierHelper;
3584
+ const {toTwoPointBounds: toTwoPointBounds, toTwoPointBoundsByQuadraticCurve: toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$2, arc: arc, ellipse: ellipse$2} = BezierHelper;
3583
3585
 
3584
3586
  const {addPointBounds: addPointBounds, copy: copy$9, addPoint: addPoint$1, setPoint: setPoint$3, addBounds: addBounds, toBounds: toBounds$2} = TwoPointBoundsHelper;
3585
3587
 
@@ -3662,7 +3664,7 @@ const PathBounds = {
3662
3664
  break;
3663
3665
 
3664
3666
  case G$2:
3665
- ellipse$3(null, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], data[i + 6], data[i + 7], data[i + 8], tempPointBounds, setEndPoint);
3667
+ ellipse$2(null, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], data[i + 6], data[i + 7], data[i + 8], tempPointBounds, setEndPoint);
3666
3668
  i === 0 ? copy$9(setPointBounds, tempPointBounds) : addPointBounds(setPointBounds, tempPointBounds);
3667
3669
  x = setEndPoint.x;
3668
3670
  y = setEndPoint.y;
@@ -5519,6 +5521,7 @@ class LeafLayout {
5519
5521
  this.renderChanged = true;
5520
5522
  this.renderSpread || (this.renderSpread = 1);
5521
5523
  this.boundsChanged = true;
5524
+ this.hitCanvasChanged = true;
5522
5525
  }
5523
5526
  scaleChange() {
5524
5527
  this.scaleChanged = true;
@@ -6459,10 +6462,6 @@ let Leaf = class Leaf {
6459
6462
  }
6460
6463
  }
6461
6464
  }
6462
- set(_data, _isTemp) {}
6463
- get(_name) {
6464
- return undefined;
6465
- }
6466
6465
  setAttr(name, value) {
6467
6466
  this[name] = value;
6468
6467
  }
@@ -6479,37 +6478,10 @@ let Leaf = class Leaf {
6479
6478
  toString(options) {
6480
6479
  return JSON.stringify(this.toJSON(options));
6481
6480
  }
6482
- toSVG() {
6483
- return undefined;
6484
- }
6485
- __SVG(_data) {}
6486
- toHTML() {
6487
- return undefined;
6488
- }
6489
- __setAttr(_attrName, _newValue) {
6490
- return true;
6491
- }
6492
- __getAttr(_attrName) {
6493
- return undefined;
6494
- }
6495
- setProxyAttr(_attrName, _newValue) {}
6496
- getProxyAttr(_attrName) {
6497
- return undefined;
6498
- }
6499
- find(_condition, _options) {
6500
- return undefined;
6501
- }
6502
- findTag(_tag) {
6503
- return undefined;
6504
- }
6505
- findOne(_condition, _options) {
6506
- return undefined;
6507
- }
6508
- findId(_id) {
6509
- return undefined;
6481
+ scaleResize(scaleX, scaleY = scaleX, _noResize, _boundsType) {
6482
+ this.scaleX *= scaleX;
6483
+ this.scaleY *= scaleY;
6510
6484
  }
6511
- focus(_value) {}
6512
- updateState() {}
6513
6485
  updateLayout() {
6514
6486
  this.__layout.update();
6515
6487
  }
@@ -6525,27 +6497,6 @@ let Leaf = class Leaf {
6525
6497
  __extraUpdate() {
6526
6498
  if (this.leaferIsReady) this.leafer.layouter.addExtra(this);
6527
6499
  }
6528
- __updateWorldMatrix() {}
6529
- __updateLocalMatrix() {}
6530
- __updateWorldBounds() {}
6531
- __updateLocalBounds() {}
6532
- __updateLocalBoxBounds() {}
6533
- __updateLocalStrokeBounds() {}
6534
- __updateLocalRenderBounds() {}
6535
- __updateBoxBounds(_secondLayout, _bounds) {}
6536
- __updateContentBounds() {}
6537
- __updateStrokeBounds(_bounds) {}
6538
- __updateRenderBounds(_bounds) {}
6539
- __updateAutoLayout() {}
6540
- __updateFlowLayout() {}
6541
- __updateNaturalSize() {}
6542
- __updateStrokeSpread() {
6543
- return 0;
6544
- }
6545
- __updateRenderSpread() {
6546
- return 0;
6547
- }
6548
- __onUpdateSize() {}
6549
6500
  __updateEraser(value) {
6550
6501
  this.__hasEraser = value ? true : this.children.some(item => item.__.eraser);
6551
6502
  }
@@ -6559,7 +6510,6 @@ let Leaf = class Leaf {
6559
6510
  __updateMask(_value) {
6560
6511
  this.__hasMask = this.children.some(item => item.__.mask && item.__.visible && item.__.opacity);
6561
6512
  }
6562
- __renderMask(_canvas, _options) {}
6563
6513
  __getNowWorld(options) {
6564
6514
  if (options.matrix) {
6565
6515
  if (!this.__cameraWorld) this.__cameraWorld = {};
@@ -6715,76 +6665,12 @@ let Leaf = class Leaf {
6715
6665
  flip(axis, transition) {
6716
6666
  transform(this, getFlipTransform(this, axis), false, transition);
6717
6667
  }
6718
- scaleResize(scaleX, scaleY = scaleX, _noResize, _boundsType) {
6719
- this.scaleX *= scaleX;
6720
- this.scaleY *= scaleY;
6721
- }
6722
- __scaleResize(_scaleX, _scaleY) {}
6723
- resizeWidth(_width) {}
6724
- resizeHeight(_height) {}
6725
- hit(_world, _hitRadius) {
6726
- return true;
6727
- }
6728
- __hitWorld(_point, _forceHitFill) {
6729
- return true;
6730
- }
6731
- __hit(_local, _forceHitFill) {
6732
- return true;
6733
- }
6734
- __hitFill(_inner) {
6735
- return true;
6736
- }
6737
- __hitStroke(_inner, _strokeWidth) {
6738
- return true;
6739
- }
6740
- __hitPixel(_inner) {
6741
- return true;
6742
- }
6743
- __drawHitPath(_canvas) {}
6744
- __updateHitCanvas() {}
6745
- __render(_canvas, _options) {}
6746
- __drawFast(_canvas, _options) {}
6747
- __draw(_canvas, _options, _originCanvas) {}
6748
- __clip(_canvas, _options) {}
6749
- __renderShape(_canvas, _options) {}
6750
- __drawShape(_canvas, _options) {}
6751
- __updateWorldOpacity() {}
6752
- __updateChange() {}
6753
- __drawPath(_canvas) {}
6754
- __drawRenderPath(_canvas) {}
6755
- __updatePath() {}
6756
- __updateRenderPath(_updateCache) {}
6757
- getMotionPathData() {
6758
- return Plugin.need("path");
6759
- }
6760
- getMotionPoint(_motionDistance) {
6761
- return Plugin.need("path");
6762
- }
6763
- getMotionTotal() {
6764
- return 0;
6765
- }
6766
- __updateMotionPath() {}
6767
- __runAnimation(_type, _complete) {}
6768
- __updateSortChildren() {}
6769
- add(_child, _index) {}
6770
6668
  remove(_child, destroy) {
6771
6669
  if (this.parent) this.parent.remove(this, destroy);
6772
6670
  }
6773
6671
  dropTo(parent, index, resize) {
6774
6672
  drop(this, parent, index, resize);
6775
6673
  }
6776
- on(_type, _listener, _options) {}
6777
- off(_type, _listener, _options) {}
6778
- on_(_type, _listener, _bind, _options) {
6779
- return undefined;
6780
- }
6781
- off_(_id) {}
6782
- once(_type, _listener, _captureOrBind, _capture) {}
6783
- emit(_type, _event, _capture) {}
6784
- emitEvent(_event, _capture) {}
6785
- hasEvent(_type, _capture) {
6786
- return false;
6787
- }
6788
6674
  static changeAttr(attrName, defaultValue, fn) {
6789
6675
  fn ? this.addAttr(attrName, defaultValue, fn) : defineDataProcessor(this.prototype, attrName, defaultValue);
6790
6676
  }
@@ -7090,7 +6976,7 @@ class LeafLevelList {
7090
6976
  }
7091
6977
  }
7092
6978
 
7093
- const version = "2.1.4";
6979
+ const version = "2.1.5";
7094
6980
 
7095
6981
  class LeaferCanvas extends LeaferCanvasBase {
7096
6982
  get allowBackgroundColor() {
@@ -8577,17 +8463,12 @@ let UI = UI_1 = class UI extends Leaf {
8577
8463
  if (!path) this.__drawPathByBox(pen);
8578
8464
  return pen;
8579
8465
  }
8580
- reset(_data) {}
8581
8466
  set(data, _transition) {
8582
8467
  if (data) Object.assign(this, data);
8583
8468
  }
8584
8469
  get(name) {
8585
8470
  return isString(name) ? this.__.__getInput(name) : this.__.__getInputData(name);
8586
8471
  }
8587
- createProxyData() {
8588
- return undefined;
8589
- }
8590
- clearProxyData() {}
8591
8472
  find(_condition, _options) {
8592
8473
  return Plugin.need("find");
8593
8474
  }
@@ -8625,6 +8506,7 @@ let UI = UI_1 = class UI extends Leaf {
8625
8506
  data.lazy && !this.__inLazyBounds && !Export.running ? data.__needComputePaint = true : data.__computePaint();
8626
8507
  }
8627
8508
  }
8509
+ __updatePath() {}
8628
8510
  __updateRenderPath(updateCache) {
8629
8511
  const data = this.__;
8630
8512
  if (data.path) {
@@ -8660,7 +8542,6 @@ let UI = UI_1 = class UI extends Leaf {
8660
8542
  this.set(keyframe);
8661
8543
  return Plugin.need("animate");
8662
8544
  }
8663
- killAnimate(_type, _nextStyle) {}
8664
8545
  export(_filename, _options) {
8665
8546
  return Plugin.need("export");
8666
8547
  }
@@ -8836,8 +8717,6 @@ __decorate([ dataType(100) ], UI.prototype, "placeholderDelay", void 0);
8836
8717
 
8837
8718
  __decorate([ dataType({}) ], UI.prototype, "data", void 0);
8838
8719
 
8839
- __decorate([ rewrite(Leaf.prototype.reset) ], UI.prototype, "reset", null);
8840
-
8841
8720
  UI = UI_1 = __decorate([ useModule(UIBounds), useModule(UIRender), rewriteAble() ], UI);
8842
8721
 
8843
8722
  let Group = class Group extends UI {
@@ -8874,9 +8753,6 @@ let Group = class Group extends UI {
8874
8753
  }
8875
8754
  return data;
8876
8755
  }
8877
- pick(_hitPoint, _options) {
8878
- return undefined;
8879
- }
8880
8756
  addAt(child, index) {
8881
8757
  this.add(child, index);
8882
8758
  }
@@ -8886,11 +8762,6 @@ let Group = class Group extends UI {
8886
8762
  addBefore(child, before) {
8887
8763
  this.add(child, this.children.indexOf(before));
8888
8764
  }
8889
- add(_child, _index) {}
8890
- addMany(..._children) {}
8891
- remove(_child, _destroy) {}
8892
- removeAll(_destroy) {}
8893
- clear() {}
8894
8765
  };
8895
8766
 
8896
8767
  __decorate([ dataProcessor(GroupData) ], Group.prototype, "__", void 0);
@@ -9430,7 +9301,7 @@ __decorate([ affectRenderBoundsType("hide") ], Frame.prototype, "overflow", void
9430
9301
 
9431
9302
  Frame = __decorate([ registerUI() ], Frame);
9432
9303
 
9433
- const {moveTo: moveTo$3, closePath: closePath$2, ellipse: ellipse$2} = PathCommandDataHelper;
9304
+ const {moveTo: moveTo$3, closePath: closePath$2, ellipse: ellipse$1} = PathCommandDataHelper;
9434
9305
 
9435
9306
  let Ellipse = class Ellipse extends UI {
9436
9307
  get __tag() {
@@ -9443,21 +9314,21 @@ let Ellipse = class Ellipse extends UI {
9443
9314
  let open;
9444
9315
  if (innerRadius) {
9445
9316
  if (startAngle || endAngle) {
9446
- if (innerRadius < 1) ellipse$2(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle, false); else open = true;
9447
- ellipse$2(path, rx, ry, rx, ry, 0, endAngle, startAngle, true);
9317
+ if (innerRadius < 1) ellipse$1(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle, false); else open = true;
9318
+ ellipse$1(path, rx, ry, rx, ry, 0, endAngle, startAngle, true);
9448
9319
  } else {
9449
9320
  if (innerRadius < 1) {
9450
- ellipse$2(path, rx, ry, rx * innerRadius, ry * innerRadius);
9321
+ ellipse$1(path, rx, ry, rx * innerRadius, ry * innerRadius);
9451
9322
  moveTo$3(path, width, ry);
9452
9323
  }
9453
- ellipse$2(path, rx, ry, rx, ry, 0, 360, 0, true);
9324
+ ellipse$1(path, rx, ry, rx, ry, 0, 360, 0, true);
9454
9325
  }
9455
9326
  } else {
9456
9327
  if (startAngle || endAngle) {
9457
9328
  moveTo$3(path, rx, ry);
9458
- ellipse$2(path, rx, ry, rx, ry, 0, startAngle, endAngle, false);
9329
+ ellipse$1(path, rx, ry, rx, ry, 0, startAngle, endAngle, false);
9459
9330
  } else {
9460
- ellipse$2(path, rx, ry, rx, ry);
9331
+ ellipse$1(path, rx, ry, rx, ry);
9461
9332
  }
9462
9333
  }
9463
9334
  if (!open) closePath$2(path);
@@ -9864,51 +9735,6 @@ let Pen = class Pen extends Group {
9864
9735
  this.add(path);
9865
9736
  return this;
9866
9737
  }
9867
- beginPath() {
9868
- return this;
9869
- }
9870
- moveTo(_x, _y) {
9871
- return this;
9872
- }
9873
- lineTo(_x, _y) {
9874
- return this;
9875
- }
9876
- bezierCurveTo(_x1, _y1, _x2, _y2, _x, _y) {
9877
- return this;
9878
- }
9879
- quadraticCurveTo(_x1, _y1, _x, _y) {
9880
- return this;
9881
- }
9882
- closePath() {
9883
- return this;
9884
- }
9885
- rect(_x, _y, _width, _height) {
9886
- return this;
9887
- }
9888
- roundRect(_x, _y, _width, _height, _cornerRadius) {
9889
- return this;
9890
- }
9891
- ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) {
9892
- return this;
9893
- }
9894
- arc(_x, _y, _radius, _startAngle, _endAngle, _anticlockwise) {
9895
- return this;
9896
- }
9897
- arcTo(_x1, _y1, _x2, _y2, _radius) {
9898
- return this;
9899
- }
9900
- drawEllipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) {
9901
- return this;
9902
- }
9903
- drawArc(_x, _y, _radius, _startAngle, _endAngle, _anticlockwise) {
9904
- return this;
9905
- }
9906
- drawPoints(_points, _curve, _close) {
9907
- return this;
9908
- }
9909
- clearPath() {
9910
- return this;
9911
- }
9912
9738
  paint() {
9913
9739
  const {pathElement: pathElement} = this;
9914
9740
  if (!pathElement.__layout.boxChanged) pathElement.forceUpdate("path");
@@ -11890,7 +11716,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
11890
11716
  needUpdate = false;
11891
11717
  }
11892
11718
  }
11893
- if (paint.mode === "brush") PaintImage.brush(leafPaint, ui);
11719
+ if (paint.mode === "brush") PaintImage.brush(leafPaint, ui, attrName);
11894
11720
  if (!leafPaint.data) {
11895
11721
  PaintImage.createData(leafPaint, image, paint, boxBounds);
11896
11722
  const {transform: transform} = leafPaint.data, {opacity: opacity} = paint;
@@ -15955,7 +15781,8 @@ UI.addAttr("editConfig", undefined, dataType);
15955
15781
 
15956
15782
  UI.addAttr("editOuter", ui => {
15957
15783
  ui.updateLayout();
15958
- return ui.__.__isLinePath ? "LineEditTool" : "EditTool";
15784
+ const name = (ui.tag === "Line" ? "" : ui.tag) + "EditTool";
15785
+ return ui.__.__isLinePath ? "LineEditTool" : EditToolCreator.list[name] ? name : "EditTool";
15959
15786
  }, dataType);
15960
15787
 
15961
15788
  UI.addAttr("editInner", "PathEditor", dataType);
@@ -16241,8 +16068,9 @@ function addViewport(leafer, mergeConfig, custom) {
16241
16068
  addViewportConfig(leafer.parentApp ? leafer.parentApp : leafer, mergeConfig);
16242
16069
  if (leafer.isApp || custom) return;
16243
16070
  leafer.__eventIds.push(leafer.on_(MoveEvent.BEFORE_MOVE, e => {
16244
- const move = leafer.getValidMove(e.moveX, e.moveY, false);
16245
- if (getScrollType(leafer).includes("limit")) {
16071
+ const limit = getScrollType(leafer).includes("limit"), stopLimit = leafer.app.config.move.scrollLimit === "stop";
16072
+ const move = leafer.getValidMove(e.moveX, e.moveY, limit && stopLimit);
16073
+ if (limit && !stopLimit) {
16246
16074
  const testMove = leafer.getValidMove(0, 0);
16247
16075
  if (testMove.x || testMove.y) {
16248
16076
  const maxX = 100, maxY = 200, resistance = e.moveType === "drag" ? .3 : .05;
@@ -20883,7 +20711,7 @@ UI.addAttr("scaleFixed", undefined, scaleFixedType);
20883
20711
 
20884
20712
  class EllipseBoxData extends BoxData {}
20885
20713
 
20886
- const ellipse$1 = Ellipse.prototype;
20714
+ const ellipse = Ellipse.prototype;
20887
20715
 
20888
20716
  let EllipseBox = class EllipseBox extends Box {
20889
20717
  get __tag() {
@@ -20900,7 +20728,7 @@ __decorate([ pathType(0) ], EllipseBox.prototype, "startAngle", void 0);
20900
20728
 
20901
20729
  __decorate([ pathType(0) ], EllipseBox.prototype, "endAngle", void 0);
20902
20730
 
20903
- __decorate([ rewrite(ellipse$1.__updatePath) ], EllipseBox.prototype, "__updatePath", null);
20731
+ __decorate([ rewrite(ellipse.__updatePath) ], EllipseBox.prototype, "__updatePath", null);
20904
20732
 
20905
20733
  EllipseBox = __decorate([ rewriteAble(), registerUI() ], EllipseBox);
20906
20734
 
@@ -20933,7 +20761,7 @@ PolygonBox = __decorate([ rewriteAble(), registerUI() ], PolygonBox);
20933
20761
 
20934
20762
  class StarBoxData extends BoxData {}
20935
20763
 
20936
- const ellipse = Star.prototype;
20764
+ const star = Star.prototype;
20937
20765
 
20938
20766
  let StarBox = class StarBox extends Box {
20939
20767
  get __tag() {
@@ -20948,7 +20776,7 @@ __decorate([ pathType(.382) ], StarBox.prototype, "innerRadius", void 0);
20948
20776
 
20949
20777
  __decorate([ dataProcessor(StarBoxData) ], StarBox.prototype, "__", void 0);
20950
20778
 
20951
- __decorate([ rewrite(ellipse.__updatePath) ], StarBox.prototype, "__updatePath", null);
20779
+ __decorate([ rewrite(star.__updatePath) ], StarBox.prototype, "__updatePath", null);
20952
20780
 
20953
20781
  StarBox = __decorate([ rewriteAble(), registerUI() ], StarBox);
20954
20782