leafer-game 2.3.2 → 2.3.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/web.js +11 -5
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +11 -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
|
@@ -1698,6 +1698,7 @@ var LeaferUI = function(exports) {
|
|
|
1698
1698
|
if (fileType === "text") url = "data:text/plain;charset=utf-8," + url; else if (fileType === "svg") url = "data:image/svg+xml," + url;
|
|
1699
1699
|
return url;
|
|
1700
1700
|
},
|
|
1701
|
+
origin: {},
|
|
1701
1702
|
image: {
|
|
1702
1703
|
hitCanvasSize: 100,
|
|
1703
1704
|
maxCacheSize: 2560 * 1600,
|
|
@@ -4597,6 +4598,7 @@ var LeaferUI = function(exports) {
|
|
|
4597
4598
|
updateComplex(_leaf) {},
|
|
4598
4599
|
checkComplex(_leaf) {},
|
|
4599
4600
|
updateFlowLayout(_leaf) {},
|
|
4601
|
+
listenPositionNode(_leaf) {},
|
|
4600
4602
|
updatePositionLayout(_leaf) {},
|
|
4601
4603
|
moveWorld(t, x, y = 0, isInnerPoint, transition) {
|
|
4602
4604
|
const local = isObject(x) ? Object.assign({}, x) : {
|
|
@@ -5757,7 +5759,10 @@ var LeaferUI = function(exports) {
|
|
|
5757
5759
|
layout.resized = "inner";
|
|
5758
5760
|
}
|
|
5759
5761
|
if (layout.localBoxChanged) {
|
|
5760
|
-
if (this.__local)
|
|
5762
|
+
if (this.__local) {
|
|
5763
|
+
this.__updateLocalBoxBounds();
|
|
5764
|
+
if (data.__usePositionNode) LeafHelper.listenPositionNode(this);
|
|
5765
|
+
}
|
|
5761
5766
|
layout.localBoxChanged = undefined;
|
|
5762
5767
|
if (layout.strokeSpread && !layout.strokeChanged) layout.strokeChanged = layout.boxChanged ? true : 2;
|
|
5763
5768
|
if (layout.renderSpread && !layout.renderChanged) layout.renderChanged = layout.boxChanged ? true : 2;
|
|
@@ -6652,7 +6657,7 @@ var LeaferUI = function(exports) {
|
|
|
6652
6657
|
this.levelMap = null;
|
|
6653
6658
|
}
|
|
6654
6659
|
}
|
|
6655
|
-
const version = "2.3.
|
|
6660
|
+
const version = "2.3.4";
|
|
6656
6661
|
if (typeof globalThis !== "undefined") {
|
|
6657
6662
|
const globalLeafer = globalThis.Leafer || (globalThis.Leafer = {});
|
|
6658
6663
|
globalLeafer.version = version;
|
|
@@ -6686,7 +6691,7 @@ var LeaferUI = function(exports) {
|
|
|
6686
6691
|
this.parentView = this.view.parentElement;
|
|
6687
6692
|
if (this.parentView) {
|
|
6688
6693
|
const pStyle = this.parentView.style;
|
|
6689
|
-
pStyle.webkitUserSelect = pStyle.userSelect = "none";
|
|
6694
|
+
if (!config.userSelectHTML) pStyle.webkitUserSelect = pStyle.userSelect = "none";
|
|
6690
6695
|
this.view.classList.add("leafer-canvas-view");
|
|
6691
6696
|
}
|
|
6692
6697
|
if (Platform.syncDomFont && !this.parentView) {
|
|
@@ -6862,7 +6867,7 @@ var LeaferUI = function(exports) {
|
|
|
6862
6867
|
image: options => new LeaferImage(options)
|
|
6863
6868
|
});
|
|
6864
6869
|
function useCanvas(_canvasType, _power) {
|
|
6865
|
-
Platform.origin
|
|
6870
|
+
Object.assign(Platform.origin, {
|
|
6866
6871
|
createCanvas(width, height) {
|
|
6867
6872
|
const canvas = document.createElement("canvas");
|
|
6868
6873
|
canvas.width = width;
|
|
@@ -6914,7 +6919,7 @@ var LeaferUI = function(exports) {
|
|
|
6914
6919
|
Image: Image,
|
|
6915
6920
|
PointerEvent: PointerEvent,
|
|
6916
6921
|
DragEvent: DragEvent
|
|
6917
|
-
};
|
|
6922
|
+
});
|
|
6918
6923
|
Platform.event = {
|
|
6919
6924
|
stopDefault(origin) {
|
|
6920
6925
|
origin.preventDefault();
|
|
@@ -7000,6 +7005,7 @@ var LeaferUI = function(exports) {
|
|
|
7000
7005
|
this.add(event.target);
|
|
7001
7006
|
}
|
|
7002
7007
|
add(leaf) {
|
|
7008
|
+
if (!this.target) return;
|
|
7003
7009
|
if (this.config.usePartLayout) this.__updatedList.add(leaf);
|
|
7004
7010
|
this.update();
|
|
7005
7011
|
}
|