leafer-game 2.3.3 → 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 +6 -4
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +6 -4
- 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,
|
|
@@ -6656,7 +6657,7 @@ var LeaferUI = function(exports) {
|
|
|
6656
6657
|
this.levelMap = null;
|
|
6657
6658
|
}
|
|
6658
6659
|
}
|
|
6659
|
-
const version = "2.3.
|
|
6660
|
+
const version = "2.3.4";
|
|
6660
6661
|
if (typeof globalThis !== "undefined") {
|
|
6661
6662
|
const globalLeafer = globalThis.Leafer || (globalThis.Leafer = {});
|
|
6662
6663
|
globalLeafer.version = version;
|
|
@@ -6690,7 +6691,7 @@ var LeaferUI = function(exports) {
|
|
|
6690
6691
|
this.parentView = this.view.parentElement;
|
|
6691
6692
|
if (this.parentView) {
|
|
6692
6693
|
const pStyle = this.parentView.style;
|
|
6693
|
-
pStyle.webkitUserSelect = pStyle.userSelect = "none";
|
|
6694
|
+
if (!config.userSelectHTML) pStyle.webkitUserSelect = pStyle.userSelect = "none";
|
|
6694
6695
|
this.view.classList.add("leafer-canvas-view");
|
|
6695
6696
|
}
|
|
6696
6697
|
if (Platform.syncDomFont && !this.parentView) {
|
|
@@ -6866,7 +6867,7 @@ var LeaferUI = function(exports) {
|
|
|
6866
6867
|
image: options => new LeaferImage(options)
|
|
6867
6868
|
});
|
|
6868
6869
|
function useCanvas(_canvasType, _power) {
|
|
6869
|
-
Platform.origin
|
|
6870
|
+
Object.assign(Platform.origin, {
|
|
6870
6871
|
createCanvas(width, height) {
|
|
6871
6872
|
const canvas = document.createElement("canvas");
|
|
6872
6873
|
canvas.width = width;
|
|
@@ -6918,7 +6919,7 @@ var LeaferUI = function(exports) {
|
|
|
6918
6919
|
Image: Image,
|
|
6919
6920
|
PointerEvent: PointerEvent,
|
|
6920
6921
|
DragEvent: DragEvent
|
|
6921
|
-
};
|
|
6922
|
+
});
|
|
6922
6923
|
Platform.event = {
|
|
6923
6924
|
stopDefault(origin) {
|
|
6924
6925
|
origin.preventDefault();
|
|
@@ -7004,6 +7005,7 @@ var LeaferUI = function(exports) {
|
|
|
7004
7005
|
this.add(event.target);
|
|
7005
7006
|
}
|
|
7006
7007
|
add(leaf) {
|
|
7008
|
+
if (!this.target) return;
|
|
7007
7009
|
if (this.config.usePartLayout) this.__updatedList.add(leaf);
|
|
7008
7010
|
this.update();
|
|
7009
7011
|
}
|