@leafer/miniapp 2.1.4 → 2.1.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"miniapp.esm.min.js","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\nimport { IWindingRule } from '../canvas/ICanvas'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\nexport interface IPathCommandDataWithRadius {\n data: IPathCommandData\n radius: number[]\n}\n\nexport interface IPathCommandDataWithWindingRule {\n data: IPathCommandData\n windingRule?: IWindingRule\n}\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n r?: number // 圆角半径\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n r?: number // 圆角半径\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"kpBAwIYA,GAAZ,SAAYA,GACRA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA,QACH,CALD,CAAYA,IAAAA,EAAkB,CAAA"}
1
+ {"version":3,"file":"miniapp.esm.min.js","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\nimport { IWindingRule } from '../canvas/ICanvas'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\nexport interface IPathCommandDataWithRadius {\n data: IPathCommandData\n radius: number[]\n}\n\nexport interface IPathCommandDataWithWindingRule {\n data: IPathCommandData\n windingRule?: IWindingRule\n}\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n pressure?: number // 压感\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n pressure?: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n pressure?: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n pressure?: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n r?: number // 圆角半径\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n pressure?: number // 压感\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n r?: number // 圆角半径\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"kpBA6IYA,GAAZ,SAAYA,GACRA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA,QACH,CALD,CAAYA,IAAAA,EAAkB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"miniapp.min.cjs","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\nimport { IWindingRule } from '../canvas/ICanvas'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\nexport interface IPathCommandDataWithRadius {\n data: IPathCommandData\n radius: number[]\n}\n\nexport interface IPathCommandDataWithWindingRule {\n data: IPathCommandData\n windingRule?: IWindingRule\n}\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n r?: number // 圆角半径\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n r?: number // 圆角半径\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"iBAwIYA,gpBAAAA,QAAAA,wBAAAA,GAAAA,EAAAA,QAAAA,qBAAAA,2BAAkB,CAAA,IAC1BA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA"}
1
+ {"version":3,"file":"miniapp.min.cjs","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\nimport { IWindingRule } from '../canvas/ICanvas'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\nexport interface IPathCommandDataWithRadius {\n data: IPathCommandData\n radius: number[]\n}\n\nexport interface IPathCommandDataWithWindingRule {\n data: IPathCommandData\n windingRule?: IWindingRule\n}\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n pressure?: number // 压感\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n pressure?: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n pressure?: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n pressure?: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n r?: number // 圆角半径\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n pressure?: number // 压感\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n r?: number // 圆角半径\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"iBA6IYA,gpBAAAA,QAAAA,wBAAAA,GAAAA,EAAAA,QAAAA,qBAAAA,2BAAkB,CAAA,IAC1BA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA"}
@@ -221,7 +221,7 @@ const IncrementId = {
221
221
  RUNTIME: "runtime",
222
222
  LEAF: "leaf",
223
223
  TASK: "task",
224
- CNAVAS: "canvas",
224
+ CANVAS: "canvas",
225
225
  IMAGE: "image",
226
226
  types: {},
227
227
  create(typeName) {
@@ -875,7 +875,7 @@ const PointHelper = {
875
875
  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);
876
876
  },
877
877
  reset(t) {
878
- P$7.reset(t);
878
+ t.x = t.y = 0;
879
879
  }
880
880
  };
881
881
 
@@ -1084,6 +1084,7 @@ class Matrix {
1084
1084
  }
1085
1085
  reset() {
1086
1086
  MatrixHelper.reset(this);
1087
+ return this;
1087
1088
  }
1088
1089
  }
1089
1090
 
@@ -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;
@@ -3720,7 +3722,7 @@ const {arcTo: arcTo$1} = PathCommandDataHelper;
3720
3722
 
3721
3723
  const PathCorner = {
3722
3724
  smooth(data, cornerRadius, _cornerSmoothing) {
3723
- let command, lastCommand, commandLen;
3725
+ let command, lastCommand, commandLen, startXIndex, startYIndex, smoothLen;
3724
3726
  let i = 0, x = 0, y = 0, startX = 0, startY = 0, secondX = 0, secondY = 0, lastX = 0, lastY = 0;
3725
3727
  if (isArray(cornerRadius)) cornerRadius = cornerRadius[0] || 0;
3726
3728
  const len = data.length, three = len === 9;
@@ -3729,6 +3731,11 @@ const PathCorner = {
3729
3731
  command = data[i];
3730
3732
  switch (command) {
3731
3733
  case M$6:
3734
+ smoothLen = smooth.length;
3735
+ if (smoothLen && lastCommand !== Z$4) {
3736
+ smooth[startXIndex] = startX;
3737
+ smooth[startYIndex] = startY;
3738
+ }
3732
3739
  startX = lastX = data[i + 1];
3733
3740
  startY = lastY = data[i + 2];
3734
3741
  i += 3;
@@ -3739,6 +3746,8 @@ const PathCorner = {
3739
3746
  } else {
3740
3747
  smooth.push(M$6, startX, startY);
3741
3748
  }
3749
+ startXIndex = smoothLen + 1;
3750
+ startYIndex = smoothLen + 2;
3742
3751
  break;
3743
3752
 
3744
3753
  case L$6:
@@ -3777,8 +3786,8 @@ const PathCorner = {
3777
3786
  lastCommand = command;
3778
3787
  }
3779
3788
  if (command !== Z$4) {
3780
- smooth[1] = startX;
3781
- smooth[2] = startY;
3789
+ smooth[startXIndex] = startX;
3790
+ smooth[startYIndex] = startY;
3782
3791
  }
3783
3792
  return smooth;
3784
3793
  }
@@ -5519,6 +5528,7 @@ class LeafLayout {
5519
5528
  this.renderChanged = true;
5520
5529
  this.renderSpread || (this.renderSpread = 1);
5521
5530
  this.boundsChanged = true;
5531
+ this.hitCanvasChanged = true;
5522
5532
  }
5523
5533
  scaleChange() {
5524
5534
  this.scaleChanged = true;
@@ -6459,10 +6469,6 @@ let Leaf = class Leaf {
6459
6469
  }
6460
6470
  }
6461
6471
  }
6462
- set(_data, _isTemp) {}
6463
- get(_name) {
6464
- return undefined;
6465
- }
6466
6472
  setAttr(name, value) {
6467
6473
  this[name] = value;
6468
6474
  }
@@ -6479,37 +6485,10 @@ let Leaf = class Leaf {
6479
6485
  toString(options) {
6480
6486
  return JSON.stringify(this.toJSON(options));
6481
6487
  }
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;
6488
+ scaleResize(scaleX, scaleY = scaleX, _noResize, _boundsType) {
6489
+ this.scaleX *= scaleX;
6490
+ this.scaleY *= scaleY;
6510
6491
  }
6511
- focus(_value) {}
6512
- updateState() {}
6513
6492
  updateLayout() {
6514
6493
  this.__layout.update();
6515
6494
  }
@@ -6525,27 +6504,6 @@ let Leaf = class Leaf {
6525
6504
  __extraUpdate() {
6526
6505
  if (this.leaferIsReady) this.leafer.layouter.addExtra(this);
6527
6506
  }
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
6507
  __updateEraser(value) {
6550
6508
  this.__hasEraser = value ? true : this.children.some(item => item.__.eraser);
6551
6509
  }
@@ -6559,7 +6517,6 @@ let Leaf = class Leaf {
6559
6517
  __updateMask(_value) {
6560
6518
  this.__hasMask = this.children.some(item => item.__.mask && item.__.visible && item.__.opacity);
6561
6519
  }
6562
- __renderMask(_canvas, _options) {}
6563
6520
  __getNowWorld(options) {
6564
6521
  if (options.matrix) {
6565
6522
  if (!this.__cameraWorld) this.__cameraWorld = {};
@@ -6715,76 +6672,12 @@ let Leaf = class Leaf {
6715
6672
  flip(axis, transition) {
6716
6673
  transform(this, getFlipTransform(this, axis), false, transition);
6717
6674
  }
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
6675
  remove(_child, destroy) {
6771
6676
  if (this.parent) this.parent.remove(this, destroy);
6772
6677
  }
6773
6678
  dropTo(parent, index, resize) {
6774
6679
  drop(this, parent, index, resize);
6775
6680
  }
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
6681
  static changeAttr(attrName, defaultValue, fn) {
6789
6682
  fn ? this.addAttr(attrName, defaultValue, fn) : defineDataProcessor(this.prototype, attrName, defaultValue);
6790
6683
  }
@@ -7090,7 +6983,7 @@ class LeafLevelList {
7090
6983
  }
7091
6984
  }
7092
6985
 
7093
- const version = "2.1.4";
6986
+ const version = "2.1.6";
7094
6987
 
7095
6988
  class LeaferCanvas extends LeaferCanvasBase {
7096
6989
  get allowBackgroundColor() {
@@ -8736,17 +8629,12 @@ let UI = UI_1 = class UI extends Leaf {
8736
8629
  if (!path) this.__drawPathByBox(pen);
8737
8630
  return pen;
8738
8631
  }
8739
- reset(_data) {}
8740
8632
  set(data, _transition) {
8741
8633
  if (data) Object.assign(this, data);
8742
8634
  }
8743
8635
  get(name) {
8744
8636
  return isString(name) ? this.__.__getInput(name) : this.__.__getInputData(name);
8745
8637
  }
8746
- createProxyData() {
8747
- return undefined;
8748
- }
8749
- clearProxyData() {}
8750
8638
  find(_condition, _options) {
8751
8639
  return Plugin.need("find");
8752
8640
  }
@@ -8784,6 +8672,7 @@ let UI = UI_1 = class UI extends Leaf {
8784
8672
  data.lazy && !this.__inLazyBounds && !Export.running ? data.__needComputePaint = true : data.__computePaint();
8785
8673
  }
8786
8674
  }
8675
+ __updatePath() {}
8787
8676
  __updateRenderPath(updateCache) {
8788
8677
  const data = this.__;
8789
8678
  if (data.path) {
@@ -8819,7 +8708,6 @@ let UI = UI_1 = class UI extends Leaf {
8819
8708
  this.set(keyframe);
8820
8709
  return Plugin.need("animate");
8821
8710
  }
8822
- killAnimate(_type, _nextStyle) {}
8823
8711
  export(_filename, _options) {
8824
8712
  return Plugin.need("export");
8825
8713
  }
@@ -8995,8 +8883,6 @@ __decorate([ dataType(100) ], UI.prototype, "placeholderDelay", void 0);
8995
8883
 
8996
8884
  __decorate([ dataType({}) ], UI.prototype, "data", void 0);
8997
8885
 
8998
- __decorate([ rewrite(Leaf.prototype.reset) ], UI.prototype, "reset", null);
8999
-
9000
8886
  UI = UI_1 = __decorate([ useModule(UIBounds), useModule(UIRender), rewriteAble() ], UI);
9001
8887
 
9002
8888
  let Group = class Group extends UI {
@@ -9033,9 +8919,6 @@ let Group = class Group extends UI {
9033
8919
  }
9034
8920
  return data;
9035
8921
  }
9036
- pick(_hitPoint, _options) {
9037
- return undefined;
9038
- }
9039
8922
  addAt(child, index) {
9040
8923
  this.add(child, index);
9041
8924
  }
@@ -9045,11 +8928,6 @@ let Group = class Group extends UI {
9045
8928
  addBefore(child, before) {
9046
8929
  this.add(child, this.children.indexOf(before));
9047
8930
  }
9048
- add(_child, _index) {}
9049
- addMany(..._children) {}
9050
- remove(_child, _destroy) {}
9051
- removeAll(_destroy) {}
9052
- clear() {}
9053
8931
  };
9054
8932
 
9055
8933
  __decorate([ dataProcessor(GroupData) ], Group.prototype, "__", void 0);
@@ -9589,7 +9467,7 @@ __decorate([ affectRenderBoundsType("hide") ], Frame.prototype, "overflow", void
9589
9467
 
9590
9468
  Frame = __decorate([ registerUI() ], Frame);
9591
9469
 
9592
- const {moveTo: moveTo$3, closePath: closePath$2, ellipse: ellipse$2} = PathCommandDataHelper;
9470
+ const {moveTo: moveTo$3, closePath: closePath$2, ellipse: ellipse$1} = PathCommandDataHelper;
9593
9471
 
9594
9472
  let Ellipse = class Ellipse extends UI {
9595
9473
  get __tag() {
@@ -9602,21 +9480,21 @@ let Ellipse = class Ellipse extends UI {
9602
9480
  let open;
9603
9481
  if (innerRadius) {
9604
9482
  if (startAngle || endAngle) {
9605
- if (innerRadius < 1) ellipse$2(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle, false); else open = true;
9606
- ellipse$2(path, rx, ry, rx, ry, 0, endAngle, startAngle, true);
9483
+ if (innerRadius < 1) ellipse$1(path, rx, ry, rx * innerRadius, ry * innerRadius, 0, startAngle, endAngle, false); else open = true;
9484
+ ellipse$1(path, rx, ry, rx, ry, 0, endAngle, startAngle, true);
9607
9485
  } else {
9608
9486
  if (innerRadius < 1) {
9609
- ellipse$2(path, rx, ry, rx * innerRadius, ry * innerRadius);
9487
+ ellipse$1(path, rx, ry, rx * innerRadius, ry * innerRadius);
9610
9488
  moveTo$3(path, width, ry);
9611
9489
  }
9612
- ellipse$2(path, rx, ry, rx, ry, 0, 360, 0, true);
9490
+ ellipse$1(path, rx, ry, rx, ry, 0, 360, 0, true);
9613
9491
  }
9614
9492
  } else {
9615
9493
  if (startAngle || endAngle) {
9616
9494
  moveTo$3(path, rx, ry);
9617
- ellipse$2(path, rx, ry, rx, ry, 0, startAngle, endAngle, false);
9495
+ ellipse$1(path, rx, ry, rx, ry, 0, startAngle, endAngle, false);
9618
9496
  } else {
9619
- ellipse$2(path, rx, ry, rx, ry);
9497
+ ellipse$1(path, rx, ry, rx, ry);
9620
9498
  }
9621
9499
  }
9622
9500
  if (!open) closePath$2(path);
@@ -10023,51 +9901,6 @@ let Pen = class Pen extends Group {
10023
9901
  this.add(path);
10024
9902
  return this;
10025
9903
  }
10026
- beginPath() {
10027
- return this;
10028
- }
10029
- moveTo(_x, _y) {
10030
- return this;
10031
- }
10032
- lineTo(_x, _y) {
10033
- return this;
10034
- }
10035
- bezierCurveTo(_x1, _y1, _x2, _y2, _x, _y) {
10036
- return this;
10037
- }
10038
- quadraticCurveTo(_x1, _y1, _x, _y) {
10039
- return this;
10040
- }
10041
- closePath() {
10042
- return this;
10043
- }
10044
- rect(_x, _y, _width, _height) {
10045
- return this;
10046
- }
10047
- roundRect(_x, _y, _width, _height, _cornerRadius) {
10048
- return this;
10049
- }
10050
- ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) {
10051
- return this;
10052
- }
10053
- arc(_x, _y, _radius, _startAngle, _endAngle, _anticlockwise) {
10054
- return this;
10055
- }
10056
- arcTo(_x1, _y1, _x2, _y2, _radius) {
10057
- return this;
10058
- }
10059
- drawEllipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) {
10060
- return this;
10061
- }
10062
- drawArc(_x, _y, _radius, _startAngle, _endAngle, _anticlockwise) {
10063
- return this;
10064
- }
10065
- drawPoints(_points, _curve, _close) {
10066
- return this;
10067
- }
10068
- clearPath() {
10069
- return this;
10070
- }
10071
9904
  paint() {
10072
9905
  const {pathElement: pathElement} = this;
10073
9906
  if (!pathElement.__layout.boxChanged) pathElement.forceUpdate("path");
@@ -12161,7 +11994,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
12161
11994
  needUpdate = false;
12162
11995
  }
12163
11996
  }
12164
- if (paint.mode === "brush") PaintImage.brush(leafPaint, ui);
11997
+ if (paint.mode === "brush") PaintImage.brush(leafPaint, ui, attrName);
12165
11998
  if (!leafPaint.data) {
12166
11999
  PaintImage.createData(leafPaint, image, paint, boxBounds);
12167
12000
  const {transform: transform} = leafPaint.data, {opacity: opacity} = paint;
@@ -12256,8 +12089,9 @@ function getPatternData(paint, box, image) {
12256
12089
  break;
12257
12090
 
12258
12091
  case "repeat":
12259
- case "brush":
12260
12092
  if (!sameBox || scaleX || rotation || skew) PaintImage.repeatMode(data, box, width, height, tempImage.x, tempImage.y, scaleX, scaleY, rotation, skew, align, paint.freeTransform);
12093
+
12094
+ case "brush":
12261
12095
  if (!repeat) data.repeat = "repeat";
12262
12096
  const count = isObject(repeat);
12263
12097
  if (gap || count) data.gap = getGapData(gap, count && repeat, tempImage.width, tempImage.height, box);
@@ -12268,7 +12102,7 @@ function getPatternData(paint, box, image) {
12268
12102
  default:
12269
12103
  if (scaleX) PaintImage.fillOrFitMode(data, box, tempImage.x, tempImage.y, scaleX, scaleY, rotation);
12270
12104
  }
12271
- if (!data.transform) {
12105
+ if (!data.transform && mode !== "brush") {
12272
12106
  if (box.x || box.y) translate$1(data.transform = get$3(), box.x, box.y);
12273
12107
  }
12274
12108
  if (scaleX) {
@@ -12397,8 +12231,9 @@ function createPattern(paint, ui, canvas, renderOptions) {
12397
12231
  let {scaleX: scaleX, scaleY: scaleY} = PaintImage.getImageRenderScaleData(paint, ui, canvas, renderOptions), id = paint.film ? paint.nowIndex : scaleX + "-" + scaleY;
12398
12232
  if (paint.patternId !== id && !ui.destroyed) {
12399
12233
  if (!(Platform.image.isLarge(paint.image, scaleX, scaleY) && !paint.data.repeat)) {
12400
- const {image: image, brush: brush, data: data} = paint, {opacity: opacity} = paint.originPaint, {transform: transform, gap: gap} = data, fixScale = PaintImage.getPatternFixScale(paint, scaleX, scaleY);
12401
- let imageMatrix, xGap, yGap, {width: width, height: height} = image;
12234
+ const {image: image, brush: brush, data: data} = paint, {transform: transform, gap: gap} = data, fixScale = PaintImage.getPatternFixScale(paint, scaleX, scaleY);
12235
+ let imageMatrix, xGap, yGap, {width: width, height: height} = image, {opacity: opacity} = paint.originPaint;
12236
+ if (brush || opacity === 1) opacity = undefined;
12402
12237
  if (fixScale) scaleX *= fixScale, scaleY *= fixScale;
12403
12238
  width *= scaleX;
12404
12239
  height *= scaleY;
@@ -16232,7 +16067,8 @@ UI.addAttr("editConfig", undefined, dataType);
16232
16067
 
16233
16068
  UI.addAttr("editOuter", ui => {
16234
16069
  ui.updateLayout();
16235
- return ui.__.__isLinePath ? "LineEditTool" : "EditTool";
16070
+ const name = (ui.tag === "Line" ? "" : ui.tag) + "EditTool";
16071
+ return ui.__.__isLinePath ? "LineEditTool" : EditToolCreator.list[name] ? name : "EditTool";
16236
16072
  }, dataType);
16237
16073
 
16238
16074
  UI.addAttr("editInner", "PathEditor", dataType);
@@ -16262,8 +16098,9 @@ function addViewport(leafer, mergeConfig, custom) {
16262
16098
  addViewportConfig(leafer.parentApp ? leafer.parentApp : leafer, mergeConfig);
16263
16099
  if (leafer.isApp || custom) return;
16264
16100
  leafer.__eventIds.push(leafer.on_(MoveEvent.BEFORE_MOVE, e => {
16265
- const move = leafer.getValidMove(e.moveX, e.moveY, false);
16266
- if (getScrollType(leafer).includes("limit")) {
16101
+ const limit = getScrollType(leafer).includes("limit"), stopLimit = leafer.app.config.move.scrollLimit === "stop";
16102
+ const move = leafer.getValidMove(e.moveX, e.moveY, limit && stopLimit);
16103
+ if (limit && !stopLimit) {
16267
16104
  const testMove = leafer.getValidMove(0, 0);
16268
16105
  if (testMove.x || testMove.y) {
16269
16106
  const maxX = 100, maxY = 200, resistance = e.moveType === "drag" ? .3 : .05;
@@ -20765,7 +20602,7 @@ UI.addAttr("scaleFixed", undefined, scaleFixedType);
20765
20602
 
20766
20603
  class EllipseBoxData extends BoxData {}
20767
20604
 
20768
- const ellipse$1 = Ellipse.prototype;
20605
+ const ellipse = Ellipse.prototype;
20769
20606
 
20770
20607
  let EllipseBox = class EllipseBox extends Box {
20771
20608
  get __tag() {
@@ -20782,7 +20619,7 @@ __decorate([ pathType(0) ], EllipseBox.prototype, "startAngle", void 0);
20782
20619
 
20783
20620
  __decorate([ pathType(0) ], EllipseBox.prototype, "endAngle", void 0);
20784
20621
 
20785
- __decorate([ rewrite(ellipse$1.__updatePath) ], EllipseBox.prototype, "__updatePath", null);
20622
+ __decorate([ rewrite(ellipse.__updatePath) ], EllipseBox.prototype, "__updatePath", null);
20786
20623
 
20787
20624
  EllipseBox = __decorate([ rewriteAble(), registerUI() ], EllipseBox);
20788
20625
 
@@ -20815,7 +20652,7 @@ PolygonBox = __decorate([ rewriteAble(), registerUI() ], PolygonBox);
20815
20652
 
20816
20653
  class StarBoxData extends BoxData {}
20817
20654
 
20818
- const ellipse = Star.prototype;
20655
+ const star = Star.prototype;
20819
20656
 
20820
20657
  let StarBox = class StarBox extends Box {
20821
20658
  get __tag() {
@@ -20830,7 +20667,7 @@ __decorate([ pathType(.382) ], StarBox.prototype, "innerRadius", void 0);
20830
20667
 
20831
20668
  __decorate([ dataProcessor(StarBoxData) ], StarBox.prototype, "__", void 0);
20832
20669
 
20833
- __decorate([ rewrite(ellipse.__updatePath) ], StarBox.prototype, "__updatePath", null);
20670
+ __decorate([ rewrite(star.__updatePath) ], StarBox.prototype, "__updatePath", null);
20834
20671
 
20835
20672
  StarBox = __decorate([ rewriteAble(), registerUI() ], StarBox);
20836
20673