@leafer-draw/miniapp 2.1.10 → 2.1.11
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/miniapp.module.js
CHANGED
|
@@ -1256,7 +1256,6 @@ const BoundsHelper = {
|
|
|
1256
1256
|
},
|
|
1257
1257
|
copyAndSpread(t, bounds, spread, isShrink, side) {
|
|
1258
1258
|
const {x: x, y: y, width: width, height: height} = bounds;
|
|
1259
|
-
if (!spread) spread = 0;
|
|
1260
1259
|
if (isArray(spread)) {
|
|
1261
1260
|
const four = fourNumber(spread);
|
|
1262
1261
|
isShrink ? B.set(t, x + four[3], y + four[0], width - four[1] - four[3], height - four[2] - four[0]) : B.set(t, x - four[3], y - four[0], width + four[1] + four[3], height + four[2] + four[0]);
|
|
@@ -3577,7 +3576,8 @@ const PathDrawer = {
|
|
|
3577
3576
|
return;
|
|
3578
3577
|
}
|
|
3579
3578
|
}
|
|
3580
|
-
}
|
|
3579
|
+
},
|
|
3580
|
+
drawPathByPoints(_drawer, _points, _closed) {}
|
|
3581
3581
|
};
|
|
3582
3582
|
|
|
3583
3583
|
const {M: M$1, L: L$2, C: C, Q: Q, Z: Z$1, N: N, D: D, X: X, G: G, F: F$1, O: O, P: P, U: U} = PathCommandMap;
|
|
@@ -6985,7 +6985,7 @@ class LeafLevelList {
|
|
|
6985
6985
|
}
|
|
6986
6986
|
}
|
|
6987
6987
|
|
|
6988
|
-
const version = "2.1.
|
|
6988
|
+
const version = "2.1.11";
|
|
6989
6989
|
|
|
6990
6990
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6991
6991
|
get allowBackgroundColor() {
|
|
@@ -8488,8 +8488,9 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8488
8488
|
this.__drawPathByData(canvas, data.__pathForRender);
|
|
8489
8489
|
}
|
|
8490
8490
|
__drawPath(canvas) {
|
|
8491
|
+
const data = this.__;
|
|
8491
8492
|
canvas.beginPath();
|
|
8492
|
-
this.__drawPathByData(canvas,
|
|
8493
|
+
data.__usePointsMode ? PathDrawer.drawPathByPoints(canvas, data.points, data.closed) : this.__drawPathByData(canvas, data.path, true);
|
|
8493
8494
|
}
|
|
8494
8495
|
__drawPathByData(drawer, data, ignoreCornerRadius) {
|
|
8495
8496
|
data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer, ignoreCornerRadius);
|
|
@@ -9346,6 +9347,9 @@ let Polygon = class Polygon extends UI {
|
|
|
9346
9347
|
get __tag() {
|
|
9347
9348
|
return "Polygon";
|
|
9348
9349
|
}
|
|
9350
|
+
get isPointsMode() {
|
|
9351
|
+
return this.points && !this.pathInputed;
|
|
9352
|
+
}
|
|
9349
9353
|
__updatePath() {
|
|
9350
9354
|
const data = this.__;
|
|
9351
9355
|
const path = data.path = [];
|
|
@@ -9423,6 +9427,9 @@ let Line = class Line extends UI {
|
|
|
9423
9427
|
get __tag() {
|
|
9424
9428
|
return "Line";
|
|
9425
9429
|
}
|
|
9430
|
+
get isPointsMode() {
|
|
9431
|
+
return this.points && !this.pathInputed;
|
|
9432
|
+
}
|
|
9426
9433
|
get toPoint() {
|
|
9427
9434
|
const {width: width, rotation: rotation} = this.__;
|
|
9428
9435
|
const to = getPointData();
|