@leafer-draw/miniapp 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/miniapp.cjs +2 -2
- package/dist/miniapp.esm.js +2 -2
- package/dist/miniapp.esm.min.js +1 -1
- package/dist/miniapp.esm.min.js.map +1 -1
- package/dist/miniapp.min.cjs +1 -1
- package/dist/miniapp.min.cjs.map +1 -1
- package/dist/miniapp.module.js +18 -9
- package/dist/miniapp.module.min.js +1 -1
- package/dist/miniapp.module.min.js.map +1 -1
- package/package.json +7 -7
package/dist/miniapp.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
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
7057
7059
|
get allowBackgroundColor() {
|
|
@@ -8193,7 +8195,11 @@ class EllipseData extends UIData {
|
|
|
8193
8195
|
|
|
8194
8196
|
class PolygonData extends LineData {}
|
|
8195
8197
|
|
|
8196
|
-
class StarData extends UIData {
|
|
8198
|
+
class StarData extends UIData {
|
|
8199
|
+
get __boxStroke() {
|
|
8200
|
+
return !this.__pathInputed;
|
|
8201
|
+
}
|
|
8202
|
+
}
|
|
8197
8203
|
|
|
8198
8204
|
class PathData extends UIData {
|
|
8199
8205
|
get __pathInputed() {
|
|
@@ -9205,6 +9211,9 @@ let Box = class Box extends Group {
|
|
|
9205
9211
|
get isBranchLeaf() {
|
|
9206
9212
|
return true;
|
|
9207
9213
|
}
|
|
9214
|
+
get __useSelfBox() {
|
|
9215
|
+
return this.pathInputed;
|
|
9216
|
+
}
|
|
9208
9217
|
constructor(data) {
|
|
9209
9218
|
super(data);
|
|
9210
9219
|
this.__layout.renderChanged || this.__layout.renderChange();
|
|
@@ -9220,7 +9229,7 @@ let Box = class Box extends Group {
|
|
|
9220
9229
|
}
|
|
9221
9230
|
__updateRectBoxBounds() {}
|
|
9222
9231
|
__updateBoxBounds(_secondLayout) {
|
|
9223
|
-
if (this.children.length && !this.
|
|
9232
|
+
if (this.children.length && !this.__useSelfBox) {
|
|
9224
9233
|
const data = this.__;
|
|
9225
9234
|
if (data.__autoSide) {
|
|
9226
9235
|
if (data.__hasSurface) this.__extraUpdate();
|
|
@@ -10530,7 +10539,7 @@ function checkImage(paint, drawImage, ui, canvas, renderOptions) {
|
|
|
10530
10539
|
if (drawImage) {
|
|
10531
10540
|
if (data.repeat) {
|
|
10532
10541
|
drawImage = false;
|
|
10533
|
-
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp"
|
|
10542
|
+
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp" || exporting)) {
|
|
10534
10543
|
drawImage = Platform.image.isLarge(image, scaleX, scaleY) || image.width * scaleX > 8096 || image.height * scaleY > 8096;
|
|
10535
10544
|
}
|
|
10536
10545
|
}
|
|
@@ -11083,7 +11092,7 @@ function createRows(drawData, content, style) {
|
|
|
11083
11092
|
}, row = {
|
|
11084
11093
|
words: []
|
|
11085
11094
|
};
|
|
11086
|
-
|
|
11095
|
+
content = [ ...content ];
|
|
11087
11096
|
for (let i = 0, len = content.length; i < len; i++) {
|
|
11088
11097
|
char = content[i];
|
|
11089
11098
|
if (char === "\n") {
|