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.module.js
CHANGED
|
@@ -1779,6 +1779,7 @@ const Platform = {
|
|
|
1779
1779
|
if (fileType === "text") url = "data:text/plain;charset=utf-8," + url; else if (fileType === "svg") url = "data:image/svg+xml," + url;
|
|
1780
1780
|
return url;
|
|
1781
1781
|
},
|
|
1782
|
+
origin: {},
|
|
1782
1783
|
image: {
|
|
1783
1784
|
hitCanvasSize: 100,
|
|
1784
1785
|
maxCacheSize: 2560 * 1600,
|
|
@@ -7081,7 +7082,7 @@ class LeafLevelList {
|
|
|
7081
7082
|
}
|
|
7082
7083
|
}
|
|
7083
7084
|
|
|
7084
|
-
const version = "2.3.
|
|
7085
|
+
const version = "2.3.4";
|
|
7085
7086
|
|
|
7086
7087
|
if (typeof globalThis !== "undefined") {
|
|
7087
7088
|
const globalLeafer = globalThis.Leafer || (globalThis.Leafer = {});
|
|
@@ -7118,7 +7119,7 @@ class LeaferCanvas extends LeaferCanvasBase {
|
|
|
7118
7119
|
this.parentView = this.view.parentElement;
|
|
7119
7120
|
if (this.parentView) {
|
|
7120
7121
|
const pStyle = this.parentView.style;
|
|
7121
|
-
pStyle.webkitUserSelect = pStyle.userSelect = "none";
|
|
7122
|
+
if (!config.userSelectHTML) pStyle.webkitUserSelect = pStyle.userSelect = "none";
|
|
7122
7123
|
this.view.classList.add("leafer-canvas-view");
|
|
7123
7124
|
}
|
|
7124
7125
|
if (Platform.syncDomFont && !this.parentView) {
|
|
@@ -7298,7 +7299,7 @@ Object.assign(Creator, {
|
|
|
7298
7299
|
});
|
|
7299
7300
|
|
|
7300
7301
|
function useCanvas(_canvasType, _power) {
|
|
7301
|
-
Platform.origin
|
|
7302
|
+
Object.assign(Platform.origin, {
|
|
7302
7303
|
createCanvas(width, height) {
|
|
7303
7304
|
const canvas = document.createElement("canvas");
|
|
7304
7305
|
canvas.width = width;
|
|
@@ -7350,7 +7351,7 @@ function useCanvas(_canvasType, _power) {
|
|
|
7350
7351
|
Image: Image,
|
|
7351
7352
|
PointerEvent: PointerEvent,
|
|
7352
7353
|
DragEvent: DragEvent
|
|
7353
|
-
};
|
|
7354
|
+
});
|
|
7354
7355
|
Platform.event = {
|
|
7355
7356
|
stopDefault(origin) {
|
|
7356
7357
|
origin.preventDefault();
|
|
@@ -7444,6 +7445,7 @@ class Watcher {
|
|
|
7444
7445
|
this.add(event.target);
|
|
7445
7446
|
}
|
|
7446
7447
|
add(leaf) {
|
|
7448
|
+
if (!this.target) return;
|
|
7447
7449
|
if (this.config.usePartLayout) this.__updatedList.add(leaf);
|
|
7448
7450
|
this.update();
|
|
7449
7451
|
}
|