@leafer-ui/worker 2.0.3 → 2.0.4
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.cjs +2 -2
- package/dist/worker.esm.js +2 -2
- package/dist/worker.esm.min.js +1 -1
- package/dist/worker.esm.min.js.map +1 -1
- package/dist/worker.js +26 -9
- package/dist/worker.min.cjs +1 -1
- package/dist/worker.min.cjs.map +1 -1
- package/dist/worker.min.js +1 -1
- package/dist/worker.min.js.map +1 -1
- package/dist/worker.module.js +26 -9
- package/dist/worker.module.min.js +1 -1
- package/dist/worker.module.min.js.map +1 -1
- package/package.json +9 -9
package/dist/worker.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.4";
|
|
7055
7057
|
|
|
7056
7058
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
7057
7059
|
get allowBackgroundColor() {
|
|
@@ -8239,7 +8241,11 @@ class EllipseData extends UIData {
|
|
|
8239
8241
|
|
|
8240
8242
|
class PolygonData extends LineData {}
|
|
8241
8243
|
|
|
8242
|
-
class StarData extends UIData {
|
|
8244
|
+
class StarData extends UIData {
|
|
8245
|
+
get __boxStroke() {
|
|
8246
|
+
return !this.__pathInputed;
|
|
8247
|
+
}
|
|
8248
|
+
}
|
|
8243
8249
|
|
|
8244
8250
|
class PathData extends UIData {
|
|
8245
8251
|
get __pathInputed() {
|
|
@@ -9251,6 +9257,9 @@ let Box = class Box extends Group {
|
|
|
9251
9257
|
get isBranchLeaf() {
|
|
9252
9258
|
return true;
|
|
9253
9259
|
}
|
|
9260
|
+
get __useSelfBox() {
|
|
9261
|
+
return this.pathInputed;
|
|
9262
|
+
}
|
|
9254
9263
|
constructor(data) {
|
|
9255
9264
|
super(data);
|
|
9256
9265
|
this.__layout.renderChanged || this.__layout.renderChange();
|
|
@@ -9266,7 +9275,7 @@ let Box = class Box extends Group {
|
|
|
9266
9275
|
}
|
|
9267
9276
|
__updateRectBoxBounds() {}
|
|
9268
9277
|
__updateBoxBounds(_secondLayout) {
|
|
9269
|
-
if (this.children.length && !this.
|
|
9278
|
+
if (this.children.length && !this.__useSelfBox) {
|
|
9270
9279
|
const data = this.__;
|
|
9271
9280
|
if (data.__autoSide) {
|
|
9272
9281
|
if (data.__hasSurface) this.__extraUpdate();
|
|
@@ -10998,6 +11007,14 @@ class InteractionBase {
|
|
|
10998
11007
|
stopDragAnimate() {
|
|
10999
11008
|
this.dragger.stopAnimate();
|
|
11000
11009
|
}
|
|
11010
|
+
replaceDownTarget(target) {
|
|
11011
|
+
const {downData: downData} = this;
|
|
11012
|
+
if (downData && target) {
|
|
11013
|
+
const {path: path} = downData;
|
|
11014
|
+
path.remove(path.list[0]);
|
|
11015
|
+
path.addAt(target, 0);
|
|
11016
|
+
}
|
|
11017
|
+
}
|
|
11001
11018
|
updateDownData(data, options, merge) {
|
|
11002
11019
|
const {downData: downData} = this;
|
|
11003
11020
|
if (!data && downData) data = downData;
|
|
@@ -12084,7 +12101,7 @@ function checkImage(paint, drawImage, ui, canvas, renderOptions) {
|
|
|
12084
12101
|
if (drawImage) {
|
|
12085
12102
|
if (data.repeat) {
|
|
12086
12103
|
drawImage = false;
|
|
12087
|
-
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp"
|
|
12104
|
+
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp" || exporting)) {
|
|
12088
12105
|
drawImage = Platform.image.isLarge(image, scaleX, scaleY) || image.width * scaleX > 8096 || image.height * scaleY > 8096;
|
|
12089
12106
|
}
|
|
12090
12107
|
}
|
|
@@ -12637,7 +12654,7 @@ function createRows(drawData, content, style) {
|
|
|
12637
12654
|
}, row = {
|
|
12638
12655
|
words: []
|
|
12639
12656
|
};
|
|
12640
|
-
|
|
12657
|
+
content = [ ...content ];
|
|
12641
12658
|
for (let i = 0, len = content.length; i < len; i++) {
|
|
12642
12659
|
char = content[i];
|
|
12643
12660
|
if (char === "\n") {
|