leafer-game 2.2.1 → 2.2.3
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.js +17 -5
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +17 -5
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +12 -12
package/dist/web.js
CHANGED
|
@@ -3926,7 +3926,7 @@ var LeaferUI = function(exports) {
|
|
|
3926
3926
|
patternTasker: Resource.queue,
|
|
3927
3927
|
get(config, type) {
|
|
3928
3928
|
let image = Resource.get(config.url);
|
|
3929
|
-
if (!image) Resource.set(config.url, image = type
|
|
3929
|
+
if (!image) Resource.set(config.url, image = Creator[type || "image"](config));
|
|
3930
3930
|
image.use++;
|
|
3931
3931
|
return image;
|
|
3932
3932
|
},
|
|
@@ -5933,6 +5933,9 @@ var LeaferUI = function(exports) {
|
|
|
5933
5933
|
get isLeafer() {
|
|
5934
5934
|
return false;
|
|
5935
5935
|
}
|
|
5936
|
+
get isFrame() {
|
|
5937
|
+
return false;
|
|
5938
|
+
}
|
|
5936
5939
|
get isBranch() {
|
|
5937
5940
|
return false;
|
|
5938
5941
|
}
|
|
@@ -6074,6 +6077,16 @@ var LeaferUI = function(exports) {
|
|
|
6074
6077
|
}
|
|
6075
6078
|
}
|
|
6076
6079
|
}
|
|
6080
|
+
__bindFrame(frame) {
|
|
6081
|
+
if (this.isFrame && frame !== null) frame = this;
|
|
6082
|
+
this.frame = frame;
|
|
6083
|
+
if (this.isBranch) {
|
|
6084
|
+
const {children: children} = this;
|
|
6085
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
6086
|
+
children[i].__bindFrame(frame);
|
|
6087
|
+
}
|
|
6088
|
+
}
|
|
6089
|
+
}
|
|
6077
6090
|
setAttr(name, value) {
|
|
6078
6091
|
this[name] = value;
|
|
6079
6092
|
}
|
|
@@ -6380,6 +6393,7 @@ var LeaferUI = function(exports) {
|
|
|
6380
6393
|
child.__bindLeafer(this.leafer);
|
|
6381
6394
|
if (this.leafer.created) this.__emitChildEvent(ChildEvent.ADD, child);
|
|
6382
6395
|
}
|
|
6396
|
+
if (this.isFrame) child.__bindFrame(this);
|
|
6383
6397
|
this.__layout.affectChildrenSort && this.__layout.childrenSortChange();
|
|
6384
6398
|
}
|
|
6385
6399
|
addMany(...children) {
|
|
@@ -6435,6 +6449,7 @@ var LeaferUI = function(exports) {
|
|
|
6435
6449
|
if (this.leafer.hitCanvasManager) this.leafer.hitCanvasManager.clear();
|
|
6436
6450
|
}
|
|
6437
6451
|
}
|
|
6452
|
+
if (this.isFrame) child.__bindFrame(null);
|
|
6438
6453
|
}
|
|
6439
6454
|
__emitChildEvent(type, child) {
|
|
6440
6455
|
const event = new ChildEvent(type, child, this);
|
|
@@ -6588,7 +6603,7 @@ var LeaferUI = function(exports) {
|
|
|
6588
6603
|
this.levelMap = null;
|
|
6589
6604
|
}
|
|
6590
6605
|
}
|
|
6591
|
-
const version = "2.2.
|
|
6606
|
+
const version = "2.2.3";
|
|
6592
6607
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
6593
6608
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6594
6609
|
set zIndex(zIndex) {
|
|
@@ -8154,9 +8169,6 @@ var LeaferUI = function(exports) {
|
|
|
8154
8169
|
get app() {
|
|
8155
8170
|
return this.leafer && this.leafer.app;
|
|
8156
8171
|
}
|
|
8157
|
-
get isFrame() {
|
|
8158
|
-
return false;
|
|
8159
|
-
}
|
|
8160
8172
|
set strokeWidthFixed(value) {
|
|
8161
8173
|
this.strokeScaleFixed = value;
|
|
8162
8174
|
}
|