@leafer/miniapp 1.12.0 → 1.12.1
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.module.js
CHANGED
|
@@ -4951,10 +4951,53 @@ const BranchHelper = {
|
|
|
4951
4951
|
if (exclude && exclude === branch) continue;
|
|
4952
4952
|
updateBounds$4(branch);
|
|
4953
4953
|
}
|
|
4954
|
+
},
|
|
4955
|
+
move(branch, x, y) {
|
|
4956
|
+
let w;
|
|
4957
|
+
const {children: children} = branch;
|
|
4958
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
4959
|
+
branch = children[i];
|
|
4960
|
+
w = branch.__world;
|
|
4961
|
+
w.e += x;
|
|
4962
|
+
w.f += y;
|
|
4963
|
+
w.x += x;
|
|
4964
|
+
w.y += y;
|
|
4965
|
+
if (branch.isBranch) move$9(branch, x, y);
|
|
4966
|
+
}
|
|
4967
|
+
},
|
|
4968
|
+
scale(branch, x, y, scaleX, scaleY, a, b) {
|
|
4969
|
+
let w;
|
|
4970
|
+
const {children: children} = branch;
|
|
4971
|
+
const changeScaleX = scaleX - 1;
|
|
4972
|
+
const changeScaleY = scaleY - 1;
|
|
4973
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
4974
|
+
branch = children[i];
|
|
4975
|
+
w = branch.__world;
|
|
4976
|
+
w.a *= scaleX;
|
|
4977
|
+
w.d *= scaleY;
|
|
4978
|
+
if (w.b || w.c) {
|
|
4979
|
+
w.b *= scaleX;
|
|
4980
|
+
w.c *= scaleY;
|
|
4981
|
+
}
|
|
4982
|
+
if (w.e === w.x && w.f === w.y) {
|
|
4983
|
+
w.x = w.e += (w.e - a) * changeScaleX + x;
|
|
4984
|
+
w.y = w.f += (w.f - b) * changeScaleY + y;
|
|
4985
|
+
} else {
|
|
4986
|
+
w.e += (w.e - a) * changeScaleX + x;
|
|
4987
|
+
w.f += (w.f - b) * changeScaleY + y;
|
|
4988
|
+
w.x += (w.x - a) * changeScaleX + x;
|
|
4989
|
+
w.y += (w.y - b) * changeScaleY + y;
|
|
4990
|
+
}
|
|
4991
|
+
w.width *= scaleX;
|
|
4992
|
+
w.height *= scaleY;
|
|
4993
|
+
w.scaleX *= scaleX;
|
|
4994
|
+
w.scaleY *= scaleY;
|
|
4995
|
+
if (branch.isBranch) scale$2(branch, x, y, scaleX, scaleY, a, b);
|
|
4996
|
+
}
|
|
4954
4997
|
}
|
|
4955
4998
|
};
|
|
4956
4999
|
|
|
4957
|
-
const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack} = BranchHelper;
|
|
5000
|
+
const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack, move: move$9, scale: scale$2} = BranchHelper;
|
|
4958
5001
|
|
|
4959
5002
|
const WaitHelper = {
|
|
4960
5003
|
run(wait) {
|
|
@@ -6518,10 +6561,10 @@ let Leaf = class Leaf {
|
|
|
6518
6561
|
hit(_world, _hitRadius) {
|
|
6519
6562
|
return true;
|
|
6520
6563
|
}
|
|
6521
|
-
__hitWorld(_point) {
|
|
6564
|
+
__hitWorld(_point, _forceHitFill) {
|
|
6522
6565
|
return true;
|
|
6523
6566
|
}
|
|
6524
|
-
__hit(_local) {
|
|
6567
|
+
__hit(_local, _forceHitFill) {
|
|
6525
6568
|
return true;
|
|
6526
6569
|
}
|
|
6527
6570
|
__hitFill(_inner) {
|
|
@@ -6880,7 +6923,7 @@ class LeafLevelList {
|
|
|
6880
6923
|
}
|
|
6881
6924
|
}
|
|
6882
6925
|
|
|
6883
|
-
const version = "1.12.
|
|
6926
|
+
const version = "1.12.1";
|
|
6884
6927
|
|
|
6885
6928
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6886
6929
|
get allowBackgroundColor() {
|
|
@@ -7816,7 +7859,7 @@ class Picker {
|
|
|
7816
7859
|
hit = child.__.hitRadius ? true : hitRadiusPoint$1(child.__world, point);
|
|
7817
7860
|
if (child.isBranch) {
|
|
7818
7861
|
if (hit || child.__ignoreHitWorld) {
|
|
7819
|
-
if (child.isBranchLeaf && child.__.__clipAfterFill && !child.__hitWorld(point)) continue;
|
|
7862
|
+
if (child.isBranchLeaf && child.__.__clipAfterFill && !child.__hitWorld(point, true)) continue;
|
|
7820
7863
|
if (child.topChildren) this.eachFind(child.topChildren, false);
|
|
7821
7864
|
this.eachFind(child.children, child.__onlyHitMask);
|
|
7822
7865
|
if (child.isBranchLeaf) this.hitChild(child, point);
|
|
@@ -11135,7 +11178,7 @@ leaf$1.hit = function(worldPoint, hitRadius = 0) {
|
|
|
11135
11178
|
}) : this.__hitWorld(worldRadiusPoint);
|
|
11136
11179
|
};
|
|
11137
11180
|
|
|
11138
|
-
leaf$1.__hitWorld = function(point) {
|
|
11181
|
+
leaf$1.__hitWorld = function(point, forceHitFill) {
|
|
11139
11182
|
const data = this.__;
|
|
11140
11183
|
if (!data.hitSelf) return false;
|
|
11141
11184
|
const world = this.__world, layout = this.__layout;
|
|
@@ -11153,7 +11196,7 @@ leaf$1.__hitWorld = function(point) {
|
|
|
11153
11196
|
this.__updateHitCanvas();
|
|
11154
11197
|
if (!layout.boundsChanged) layout.hitCanvasChanged = false;
|
|
11155
11198
|
}
|
|
11156
|
-
return this.__hit(inner);
|
|
11199
|
+
return this.__hit(inner, forceHitFill);
|
|
11157
11200
|
};
|
|
11158
11201
|
|
|
11159
11202
|
leaf$1.__hitFill = function(inner) {
|
|
@@ -11220,12 +11263,12 @@ ui$5.__updateHitCanvas = function() {
|
|
|
11220
11263
|
h.setStrokeOptions(data);
|
|
11221
11264
|
};
|
|
11222
11265
|
|
|
11223
|
-
ui$5.__hit = function(inner) {
|
|
11266
|
+
ui$5.__hit = function(inner, forceHitFill) {
|
|
11224
11267
|
if (this.__box && this.__box.__hit(inner)) return true;
|
|
11225
11268
|
const data = this.__;
|
|
11226
11269
|
if (data.__isHitPixel && this.__hitPixel(inner)) return true;
|
|
11227
11270
|
const {hitFill: hitFill} = data;
|
|
11228
|
-
const needHitFillPath = (data.fill || data.__isCanvas) && (hitFill === "path" || hitFill === "pixel" && !(data.__isAlphaPixelFill || data.__isCanvas)) || hitFill === "all";
|
|
11271
|
+
const needHitFillPath = (data.fill || data.__isCanvas) && (hitFill === "path" || hitFill === "pixel" && !(data.__isAlphaPixelFill || data.__isCanvas)) || hitFill === "all" || forceHitFill;
|
|
11229
11272
|
if (needHitFillPath && this.__hitFill(inner)) return true;
|
|
11230
11273
|
const {hitStroke: hitStroke, __maxStrokeWidth: strokeWidth} = data;
|
|
11231
11274
|
const needHitStrokePath = data.stroke && (hitStroke === "path" || hitStroke === "pixel" && !data.__isAlphaPixelStroke) || hitStroke === "all";
|