leafer-draw 2.0.3 → 2.0.5
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/web.cjs +2 -2
- package/dist/web.esm.js +2 -2
- package/dist/web.esm.min.js +1 -1
- package/dist/web.esm.min.js.map +1 -1
- package/dist/web.js +18 -9
- package/dist/web.min.cjs +1 -1
- package/dist/web.min.cjs.map +1 -1
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +18 -9
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +3 -3
package/dist/web.module.js
CHANGED
|
@@ -5620,7 +5620,7 @@ class BoundsEvent extends Event {
|
|
|
5620
5620
|
}
|
|
5621
5621
|
}
|
|
5622
5622
|
static emitWorld(leaf) {
|
|
5623
|
-
if (leaf.leaferIsReady) leaf.emit(WORLD,
|
|
5623
|
+
if (leaf.leaferIsReady) leaf.emit(WORLD, leaf);
|
|
5624
5624
|
}
|
|
5625
5625
|
}
|
|
5626
5626
|
|
|
@@ -6581,14 +6581,16 @@ let Leaf = class Leaf {
|
|
|
6581
6581
|
relative.innerToWorld(world, to, distance);
|
|
6582
6582
|
world = to ? to : world;
|
|
6583
6583
|
}
|
|
6584
|
-
toInnerPoint(this.
|
|
6584
|
+
toInnerPoint(this.worldTransform, world, to, distance);
|
|
6585
6585
|
}
|
|
6586
6586
|
innerToWorld(inner, to, distance, relative) {
|
|
6587
|
-
toOuterPoint(this.
|
|
6587
|
+
toOuterPoint(this.worldTransform, inner, to, distance);
|
|
6588
6588
|
if (relative) relative.worldToInner(to ? to : inner, null, distance);
|
|
6589
6589
|
}
|
|
6590
6590
|
getBoxPoint(world, relative, distance, change) {
|
|
6591
|
-
|
|
6591
|
+
const inner = this.getInnerPoint(world, relative, distance, change);
|
|
6592
|
+
if (distance) return inner;
|
|
6593
|
+
return this.getBoxPointByInner(inner, null, null, true);
|
|
6592
6594
|
}
|
|
6593
6595
|
getBoxPointByInner(inner, _relative, _distance, change) {
|
|
6594
6596
|
const point = change ? inner : Object.assign({}, inner), {x: x, y: y} = this.boxBounds;
|
|
@@ -7051,7 +7053,7 @@ class LeafLevelList {
|
|
|
7051
7053
|
}
|
|
7052
7054
|
}
|
|
7053
7055
|
|
|
7054
|
-
const version = "2.0.
|
|
7056
|
+
const version = "2.0.5";
|
|
7055
7057
|
|
|
7056
7058
|
const debug$4 = Debug.get("LeaferCanvas");
|
|
7057
7059
|
|
|
@@ -8234,7 +8236,11 @@ class EllipseData extends UIData {
|
|
|
8234
8236
|
|
|
8235
8237
|
class PolygonData extends LineData {}
|
|
8236
8238
|
|
|
8237
|
-
class StarData extends UIData {
|
|
8239
|
+
class StarData extends UIData {
|
|
8240
|
+
get __boxStroke() {
|
|
8241
|
+
return !this.__pathInputed;
|
|
8242
|
+
}
|
|
8243
|
+
}
|
|
8238
8244
|
|
|
8239
8245
|
class PathData extends UIData {
|
|
8240
8246
|
get __pathInputed() {
|
|
@@ -9246,6 +9252,9 @@ let Box = class Box extends Group {
|
|
|
9246
9252
|
get isBranchLeaf() {
|
|
9247
9253
|
return true;
|
|
9248
9254
|
}
|
|
9255
|
+
get __useSelfBox() {
|
|
9256
|
+
return this.pathInputed;
|
|
9257
|
+
}
|
|
9249
9258
|
constructor(data) {
|
|
9250
9259
|
super(data);
|
|
9251
9260
|
this.__layout.renderChanged || this.__layout.renderChange();
|
|
@@ -9261,7 +9270,7 @@ let Box = class Box extends Group {
|
|
|
9261
9270
|
}
|
|
9262
9271
|
__updateRectBoxBounds() {}
|
|
9263
9272
|
__updateBoxBounds(_secondLayout) {
|
|
9264
|
-
if (this.children.length && !this.
|
|
9273
|
+
if (this.children.length && !this.__useSelfBox) {
|
|
9265
9274
|
const data = this.__;
|
|
9266
9275
|
if (data.__autoSide) {
|
|
9267
9276
|
if (data.__hasSurface) this.__extraUpdate();
|
|
@@ -10571,7 +10580,7 @@ function checkImage(paint, drawImage, ui, canvas, renderOptions) {
|
|
|
10571
10580
|
if (drawImage) {
|
|
10572
10581
|
if (data.repeat) {
|
|
10573
10582
|
drawImage = false;
|
|
10574
|
-
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp"
|
|
10583
|
+
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp" || exporting)) {
|
|
10575
10584
|
drawImage = Platform.image.isLarge(image, scaleX, scaleY) || image.width * scaleX > 8096 || image.height * scaleY > 8096;
|
|
10576
10585
|
}
|
|
10577
10586
|
}
|
|
@@ -11124,7 +11133,7 @@ function createRows(drawData, content, style) {
|
|
|
11124
11133
|
}, row = {
|
|
11125
11134
|
words: []
|
|
11126
11135
|
};
|
|
11127
|
-
|
|
11136
|
+
content = [ ...content ];
|
|
11128
11137
|
for (let i = 0, len = content.length; i < len; i++) {
|
|
11129
11138
|
char = content[i];
|
|
11130
11139
|
if (char === "\n") {
|