@leafer-game/worker 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/worker.js +26 -9
- 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 +12 -12
package/dist/worker.js
CHANGED
|
@@ -5289,7 +5289,7 @@ var LeaferUI = function(exports) {
|
|
|
5289
5289
|
}
|
|
5290
5290
|
}
|
|
5291
5291
|
static emitWorld(leaf) {
|
|
5292
|
-
if (leaf.leaferIsReady) leaf.emit(WORLD,
|
|
5292
|
+
if (leaf.leaferIsReady) leaf.emit(WORLD, leaf);
|
|
5293
5293
|
}
|
|
5294
5294
|
}
|
|
5295
5295
|
BoundsEvent.RESIZE = "bounds.resize";
|
|
@@ -6175,14 +6175,16 @@ var LeaferUI = function(exports) {
|
|
|
6175
6175
|
relative.innerToWorld(world, to, distance);
|
|
6176
6176
|
world = to ? to : world;
|
|
6177
6177
|
}
|
|
6178
|
-
toInnerPoint(this.
|
|
6178
|
+
toInnerPoint(this.worldTransform, world, to, distance);
|
|
6179
6179
|
}
|
|
6180
6180
|
innerToWorld(inner, to, distance, relative) {
|
|
6181
|
-
toOuterPoint(this.
|
|
6181
|
+
toOuterPoint(this.worldTransform, inner, to, distance);
|
|
6182
6182
|
if (relative) relative.worldToInner(to ? to : inner, null, distance);
|
|
6183
6183
|
}
|
|
6184
6184
|
getBoxPoint(world, relative, distance, change) {
|
|
6185
|
-
|
|
6185
|
+
const inner = this.getInnerPoint(world, relative, distance, change);
|
|
6186
|
+
if (distance) return inner;
|
|
6187
|
+
return this.getBoxPointByInner(inner, null, null, true);
|
|
6186
6188
|
}
|
|
6187
6189
|
getBoxPointByInner(inner, _relative, _distance, change) {
|
|
6188
6190
|
const point = change ? inner : Object.assign({}, inner), {x: x, y: y} = this.boxBounds;
|
|
@@ -6635,7 +6637,7 @@ var LeaferUI = function(exports) {
|
|
|
6635
6637
|
this.levelMap = null;
|
|
6636
6638
|
}
|
|
6637
6639
|
}
|
|
6638
|
-
const version = "2.0.
|
|
6640
|
+
const version = "2.0.5";
|
|
6639
6641
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6640
6642
|
get allowBackgroundColor() {
|
|
6641
6643
|
return true;
|
|
@@ -7756,7 +7758,11 @@ var LeaferUI = function(exports) {
|
|
|
7756
7758
|
}
|
|
7757
7759
|
}
|
|
7758
7760
|
class PolygonData extends LineData {}
|
|
7759
|
-
class StarData extends UIData {
|
|
7761
|
+
class StarData extends UIData {
|
|
7762
|
+
get __boxStroke() {
|
|
7763
|
+
return !this.__pathInputed;
|
|
7764
|
+
}
|
|
7765
|
+
}
|
|
7760
7766
|
class PathData extends UIData {
|
|
7761
7767
|
get __pathInputed() {
|
|
7762
7768
|
return 2;
|
|
@@ -8661,6 +8667,9 @@ var LeaferUI = function(exports) {
|
|
|
8661
8667
|
get isBranchLeaf() {
|
|
8662
8668
|
return true;
|
|
8663
8669
|
}
|
|
8670
|
+
get __useSelfBox() {
|
|
8671
|
+
return this.pathInputed;
|
|
8672
|
+
}
|
|
8664
8673
|
constructor(data) {
|
|
8665
8674
|
super(data);
|
|
8666
8675
|
this.__layout.renderChanged || this.__layout.renderChange();
|
|
@@ -8676,7 +8685,7 @@ var LeaferUI = function(exports) {
|
|
|
8676
8685
|
}
|
|
8677
8686
|
__updateRectBoxBounds() {}
|
|
8678
8687
|
__updateBoxBounds(_secondLayout) {
|
|
8679
|
-
if (this.children.length && !this.
|
|
8688
|
+
if (this.children.length && !this.__useSelfBox) {
|
|
8680
8689
|
const data = this.__;
|
|
8681
8690
|
if (data.__autoSide) {
|
|
8682
8691
|
if (data.__hasSurface) this.__extraUpdate();
|
|
@@ -10205,6 +10214,14 @@ var LeaferUI = function(exports) {
|
|
|
10205
10214
|
stopDragAnimate() {
|
|
10206
10215
|
this.dragger.stopAnimate();
|
|
10207
10216
|
}
|
|
10217
|
+
replaceDownTarget(target) {
|
|
10218
|
+
const {downData: downData} = this;
|
|
10219
|
+
if (downData && target) {
|
|
10220
|
+
const {path: path} = downData;
|
|
10221
|
+
path.remove(path.list[0]);
|
|
10222
|
+
path.addAt(target, 0);
|
|
10223
|
+
}
|
|
10224
|
+
}
|
|
10208
10225
|
updateDownData(data, options, merge) {
|
|
10209
10226
|
const {downData: downData} = this;
|
|
10210
10227
|
if (!data && downData) data = downData;
|
|
@@ -11212,7 +11229,7 @@ var LeaferUI = function(exports) {
|
|
|
11212
11229
|
if (drawImage) {
|
|
11213
11230
|
if (data.repeat) {
|
|
11214
11231
|
drawImage = false;
|
|
11215
|
-
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp"
|
|
11232
|
+
} else if (!(originPaint.changeful || paint.film || Platform.name === "miniapp" || exporting)) {
|
|
11216
11233
|
drawImage = Platform.image.isLarge(image, scaleX, scaleY) || image.width * scaleX > 8096 || image.height * scaleY > 8096;
|
|
11217
11234
|
}
|
|
11218
11235
|
}
|
|
@@ -11692,7 +11709,7 @@ var LeaferUI = function(exports) {
|
|
|
11692
11709
|
}, row = {
|
|
11693
11710
|
words: []
|
|
11694
11711
|
};
|
|
11695
|
-
|
|
11712
|
+
content = [ ...content ];
|
|
11696
11713
|
for (let i = 0, len = content.length; i < len; i++) {
|
|
11697
11714
|
char = content[i];
|
|
11698
11715
|
if (char === "\n") {
|