leafer-ui 2.2.2 → 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/README.md +3 -3
- 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 +11 -11
package/dist/web.module.js
CHANGED
|
@@ -4168,7 +4168,7 @@ const ImageManager = {
|
|
|
4168
4168
|
patternTasker: Resource.queue,
|
|
4169
4169
|
get(config, type) {
|
|
4170
4170
|
let image = Resource.get(config.url);
|
|
4171
|
-
if (!image) Resource.set(config.url, image = type
|
|
4171
|
+
if (!image) Resource.set(config.url, image = Creator[type || "image"](config));
|
|
4172
4172
|
image.use++;
|
|
4173
4173
|
return image;
|
|
4174
4174
|
},
|
|
@@ -6340,6 +6340,9 @@ let Leaf = class Leaf {
|
|
|
6340
6340
|
get isLeafer() {
|
|
6341
6341
|
return false;
|
|
6342
6342
|
}
|
|
6343
|
+
get isFrame() {
|
|
6344
|
+
return false;
|
|
6345
|
+
}
|
|
6343
6346
|
get isBranch() {
|
|
6344
6347
|
return false;
|
|
6345
6348
|
}
|
|
@@ -6481,6 +6484,16 @@ let Leaf = class Leaf {
|
|
|
6481
6484
|
}
|
|
6482
6485
|
}
|
|
6483
6486
|
}
|
|
6487
|
+
__bindFrame(frame) {
|
|
6488
|
+
if (this.isFrame && frame !== null) frame = this;
|
|
6489
|
+
this.frame = frame;
|
|
6490
|
+
if (this.isBranch) {
|
|
6491
|
+
const {children: children} = this;
|
|
6492
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
6493
|
+
children[i].__bindFrame(frame);
|
|
6494
|
+
}
|
|
6495
|
+
}
|
|
6496
|
+
}
|
|
6484
6497
|
setAttr(name, value) {
|
|
6485
6498
|
this[name] = value;
|
|
6486
6499
|
}
|
|
@@ -6793,6 +6806,7 @@ let Branch = class Branch extends Leaf {
|
|
|
6793
6806
|
child.__bindLeafer(this.leafer);
|
|
6794
6807
|
if (this.leafer.created) this.__emitChildEvent(ChildEvent.ADD, child);
|
|
6795
6808
|
}
|
|
6809
|
+
if (this.isFrame) child.__bindFrame(this);
|
|
6796
6810
|
this.__layout.affectChildrenSort && this.__layout.childrenSortChange();
|
|
6797
6811
|
}
|
|
6798
6812
|
addMany(...children) {
|
|
@@ -6848,6 +6862,7 @@ let Branch = class Branch extends Leaf {
|
|
|
6848
6862
|
if (this.leafer.hitCanvasManager) this.leafer.hitCanvasManager.clear();
|
|
6849
6863
|
}
|
|
6850
6864
|
}
|
|
6865
|
+
if (this.isFrame) child.__bindFrame(null);
|
|
6851
6866
|
}
|
|
6852
6867
|
__emitChildEvent(type, child) {
|
|
6853
6868
|
const event = new ChildEvent(type, child, this);
|
|
@@ -7005,7 +7020,7 @@ class LeafLevelList {
|
|
|
7005
7020
|
}
|
|
7006
7021
|
}
|
|
7007
7022
|
|
|
7008
|
-
const version = "2.2.
|
|
7023
|
+
const version = "2.2.3";
|
|
7009
7024
|
|
|
7010
7025
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
7011
7026
|
|
|
@@ -8652,9 +8667,6 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8652
8667
|
get app() {
|
|
8653
8668
|
return this.leafer && this.leafer.app;
|
|
8654
8669
|
}
|
|
8655
|
-
get isFrame() {
|
|
8656
|
-
return false;
|
|
8657
|
-
}
|
|
8658
8670
|
set strokeWidthFixed(value) {
|
|
8659
8671
|
this.strokeScaleFixed = value;
|
|
8660
8672
|
}
|