@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.js
CHANGED
|
@@ -1223,7 +1223,6 @@ var LeaferUI = function(exports) {
|
|
|
1223
1223
|
},
|
|
1224
1224
|
copyAndSpread(t, bounds, spread, isShrink, side) {
|
|
1225
1225
|
const {x: x, y: y, width: width, height: height} = bounds;
|
|
1226
|
-
if (!spread) spread = 0;
|
|
1227
1226
|
if (isArray(spread)) {
|
|
1228
1227
|
const four = fourNumber(spread);
|
|
1229
1228
|
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]);
|
|
@@ -3367,7 +3366,8 @@ var LeaferUI = function(exports) {
|
|
|
3367
3366
|
return;
|
|
3368
3367
|
}
|
|
3369
3368
|
}
|
|
3370
|
-
}
|
|
3369
|
+
},
|
|
3370
|
+
drawPathByPoints(_drawer, _points, _closed) {}
|
|
3371
3371
|
};
|
|
3372
3372
|
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;
|
|
3373
3373
|
const {toTwoPointBounds: toTwoPointBounds, toTwoPointBoundsByQuadraticCurve: toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$1, arc: arc, ellipse: ellipse$1} = BezierHelper;
|
|
@@ -6569,7 +6569,7 @@ var LeaferUI = function(exports) {
|
|
|
6569
6569
|
this.levelMap = null;
|
|
6570
6570
|
}
|
|
6571
6571
|
}
|
|
6572
|
-
const version = "2.1.
|
|
6572
|
+
const version = "2.1.11";
|
|
6573
6573
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6574
6574
|
get allowBackgroundColor() {
|
|
6575
6575
|
return true;
|
|
@@ -7837,8 +7837,9 @@ var LeaferUI = function(exports) {
|
|
|
7837
7837
|
this.__drawPathByData(canvas, data.__pathForRender);
|
|
7838
7838
|
}
|
|
7839
7839
|
__drawPath(canvas) {
|
|
7840
|
+
const data = this.__;
|
|
7840
7841
|
canvas.beginPath();
|
|
7841
|
-
this.__drawPathByData(canvas,
|
|
7842
|
+
data.__usePointsMode ? PathDrawer.drawPathByPoints(canvas, data.points, data.closed) : this.__drawPathByData(canvas, data.path, true);
|
|
7842
7843
|
}
|
|
7843
7844
|
__drawPathByData(drawer, data, ignoreCornerRadius) {
|
|
7844
7845
|
data ? PathDrawer.drawPathByData(drawer, data) : this.__drawPathByBox(drawer, ignoreCornerRadius);
|
|
@@ -8574,6 +8575,9 @@ var LeaferUI = function(exports) {
|
|
|
8574
8575
|
get __tag() {
|
|
8575
8576
|
return "Polygon";
|
|
8576
8577
|
}
|
|
8578
|
+
get isPointsMode() {
|
|
8579
|
+
return this.points && !this.pathInputed;
|
|
8580
|
+
}
|
|
8577
8581
|
__updatePath() {
|
|
8578
8582
|
const data = this.__;
|
|
8579
8583
|
const path = data.path = [];
|
|
@@ -8634,6 +8638,9 @@ var LeaferUI = function(exports) {
|
|
|
8634
8638
|
get __tag() {
|
|
8635
8639
|
return "Line";
|
|
8636
8640
|
}
|
|
8641
|
+
get isPointsMode() {
|
|
8642
|
+
return this.points && !this.pathInputed;
|
|
8643
|
+
}
|
|
8637
8644
|
get toPoint() {
|
|
8638
8645
|
const {width: width, rotation: rotation} = this.__;
|
|
8639
8646
|
const to = getPointData();
|