@leafer-ui/miniapp 2.2.3 → 2.2.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.
@@ -2816,7 +2816,10 @@ const BezierHelper = {
2816
2816
  if (endRadian < 0) endRadian += PI2;
2817
2817
  let totalRadian = endRadian - startRadian;
2818
2818
  if (totalRadian < 0) totalRadian += PI2; else if (totalRadian > PI2) totalRadian -= PI2;
2819
- if (anticlockwise) totalRadian -= PI2;
2819
+ if (anticlockwise) {
2820
+ const closedAngle = abs$5(endAngle - startAngle) === 360;
2821
+ if (closedAngle) totalRadian = -PI2; else totalRadian -= PI2;
2822
+ }
2820
2823
  const parts = ceil(abs$5(totalRadian / PI_2));
2821
2824
  const partRadian = totalRadian / parts;
2822
2825
  const partRadian4Sin = sin$3(partRadian / 4);
@@ -6802,11 +6805,11 @@ let Branch = class Branch extends Leaf {
6802
6805
  childLayout.boxChanged || childLayout.boxChange();
6803
6806
  childLayout.matrixChanged || childLayout.matrixChange();
6804
6807
  if (child.__bubbleMap) child.__emitLifeEvent(ChildEvent.ADD);
6808
+ if (this.isFrame) child.__bindFrame(this);
6805
6809
  if (this.leafer) {
6806
6810
  child.__bindLeafer(this.leafer);
6807
6811
  if (this.leafer.created) this.__emitChildEvent(ChildEvent.ADD, child);
6808
6812
  }
6809
- if (this.isFrame) child.__bindFrame(this);
6810
6813
  this.__layout.affectChildrenSort && this.__layout.childrenSortChange();
6811
6814
  }
6812
6815
  addMany(...children) {
@@ -7020,7 +7023,7 @@ class LeafLevelList {
7020
7023
  }
7021
7024
  }
7022
7025
 
7023
- const version = "2.2.3";
7026
+ const version = "2.2.4";
7024
7027
 
7025
7028
  class LeaferCanvas extends LeaferCanvasBase {
7026
7029
  get allowBackgroundColor() {
@@ -9515,34 +9518,28 @@ let Ellipse = class Ellipse extends UI {
9515
9518
  if (hasAngle) closedAngle = abs$3(endAngle - startAngle) === 360;
9516
9519
  if (innerRadius) {
9517
9520
  const drawInnerEllipse = innerRadius < 1 || closed;
9518
- let outerStartAngle = startAngle, outerEndAngle = endAngle, outerAnticlockwise;
9521
+ const innerRx = rx * innerRadius, innerRy = ry * innerRadius;
9519
9522
  if (hasAngle) {
9523
+ ellipse(path, rx, ry, rx, ry, 0, startAngle, endAngle);
9520
9524
  if (drawInnerEllipse) {
9521
- ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle);
9522
9525
  if (closedAngle) {
9523
- set$1(tempPoint, width, ry);
9524
- set$1(tempCenter, rx, ry);
9526
+ closePath$2(path);
9527
+ set$1(tempPoint, rx + innerRx, ry), set$1(tempCenter, rx, ry);
9525
9528
  rotate$2(tempPoint, endAngle, tempCenter, rx, ry);
9526
9529
  moveTo$3(path, tempPoint.x, tempPoint.y);
9527
9530
  }
9528
- outerStartAngle = endAngle;
9529
- outerEndAngle = startAngle;
9530
- outerAnticlockwise = true;
9531
+ ellipse(path, rx, ry, innerRx, innerRy, 0, endAngle, startAngle, true);
9531
9532
  } else {
9532
9533
  if (!closedAngle) open = true;
9533
9534
  }
9534
9535
  } else {
9536
+ ellipse(path, rx, ry, rx, ry);
9535
9537
  if (drawInnerEllipse) {
9536
- ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius);
9537
9538
  closePath$2(path);
9538
- moveTo$3(path, width, ry);
9539
- outerStartAngle = 360;
9540
- outerAnticlockwise = true;
9541
- } else {
9542
- outerEndAngle = 360;
9539
+ moveTo$3(path, rx + innerRx, ry);
9540
+ ellipse(path, rx, ry, innerRx, innerRy, 0, 360, 0, true);
9543
9541
  }
9544
9542
  }
9545
- ellipse(path, rx, ry, rx, ry, 0, outerStartAngle, outerEndAngle, outerAnticlockwise);
9546
9543
  } else {
9547
9544
  if (hasAngle) {
9548
9545
  if (!closedAngle) {
@@ -11442,7 +11439,8 @@ ui$1.__hit = function(inner, forceHitFill) {
11442
11439
  const {hitFill: hitFill} = data;
11443
11440
  const needHitFillPath = (data.fill || data.__isCanvas) && (hitFill === "path" || hitFill === "pixel" && !(data.__isAlphaPixelFill || data.__isCanvas)) || hitFill === "all" || forceHitFill;
11444
11441
  if (needHitFillPath && this.__hitFill(inner)) return true;
11445
- const {hitStroke: hitStroke, __maxStrokeWidth: strokeWidth} = data;
11442
+ const {hitStroke: hitStroke, strokeScaleFixed: strokeScaleFixed} = data;
11443
+ const strokeWidth = data.__maxStrokeWidth * (strokeScaleFixed ? this.getRenderScaleData(true, strokeScaleFixed, false).scaleX : 1);
11446
11444
  const needHitStrokePath = data.stroke && (hitStroke === "path" || hitStroke === "pixel" && !data.__isAlphaPixelStroke) || hitStroke === "all";
11447
11445
  if (!needHitFillPath && !needHitStrokePath) return false;
11448
11446
  const radiusWidth = inner.radiusX * 2;