@leafer-draw/worker 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/worker.js +11 -4
- package/dist/worker.min.js +1 -1
- package/dist/worker.min.js.map +1 -1
- package/dist/worker.module.js +11 -4
- package/dist/worker.module.min.js +1 -1
- package/dist/worker.module.min.js.map +1 -1
- package/package.json +7 -7
package/dist/worker.module.js
CHANGED
|
@@ -1295,7 +1295,6 @@ const BoundsHelper = {
|
|
|
1295
1295
|
},
|
|
1296
1296
|
copyAndSpread(t, bounds, spread, isShrink, side) {
|
|
1297
1297
|
const {x: x, y: y, width: width, height: height} = bounds;
|
|
1298
|
-
if (!spread) spread = 0;
|
|
1299
1298
|
if (isArray(spread)) {
|
|
1300
1299
|
const four = fourNumber(spread);
|
|
1301
1300
|
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() {
|
|
@@ -8329,8 +8329,9 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8329
8329
|
this.__drawPathByData(canvas, data.__pathForRender);
|
|
8330
8330
|
}
|
|
8331
8331
|
__drawPath(canvas) {
|
|
8332
|
+
const data = this.__;
|
|
8332
8333
|
canvas.beginPath();
|
|
8333
|
-
this.__drawPathByData(canvas,
|
|
8334
|
+
data.__usePointsMode ? PathDrawer.drawPathByPoints(canvas, data.points, data.closed) : this.__drawPathByData(canvas, data.path, true);
|
|
8334
8335
|
}
|
|
8335
8336
|
__drawPathByData(drawer, data, ignoreCornerRadius) {
|
|
8336
8337
|
data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer, ignoreCornerRadius);
|
|
@@ -9187,6 +9188,9 @@ let Polygon = class Polygon extends UI {
|
|
|
9187
9188
|
get __tag() {
|
|
9188
9189
|
return "Polygon";
|
|
9189
9190
|
}
|
|
9191
|
+
get isPointsMode() {
|
|
9192
|
+
return this.points && !this.pathInputed;
|
|
9193
|
+
}
|
|
9190
9194
|
__updatePath() {
|
|
9191
9195
|
const data = this.__;
|
|
9192
9196
|
const path = data.path = [];
|
|
@@ -9264,6 +9268,9 @@ let Line = class Line extends UI {
|
|
|
9264
9268
|
get __tag() {
|
|
9265
9269
|
return "Line";
|
|
9266
9270
|
}
|
|
9271
|
+
get isPointsMode() {
|
|
9272
|
+
return this.points && !this.pathInputed;
|
|
9273
|
+
}
|
|
9267
9274
|
get toPoint() {
|
|
9268
9275
|
const {width: width, rotation: rotation} = this.__;
|
|
9269
9276
|
const to = getPointData();
|