@d3p1/img2pxl 1.17.2 → 1.17.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/img2pxl.js +8 -6
- package/dist/img2pxl.js.map +1 -1
- package/dist/img2pxl.umd.cjs +3 -3
- package/dist/img2pxl.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/img2pxl.js
CHANGED
|
@@ -940,7 +940,9 @@ k = new WeakMap(), C = new WeakMap(), Q = new WeakSet(), /**
|
|
|
940
940
|
* @throws {Error}
|
|
941
941
|
*/
|
|
942
942
|
ze = function(i) {
|
|
943
|
-
if (
|
|
943
|
+
if (i.find(
|
|
944
|
+
(t) => t === pe
|
|
945
|
+
) === void 0)
|
|
944
946
|
throw new Error(
|
|
945
947
|
"The `0` breakpoint is required. It defines the default image that should be used."
|
|
946
948
|
);
|
|
@@ -1064,9 +1066,7 @@ class ii {
|
|
|
1064
1066
|
* @type {Function}
|
|
1065
1067
|
*/
|
|
1066
1068
|
a(this, I);
|
|
1067
|
-
l(this, K, i), l(this, q, new Ae(e(this, K).images)), r(this, v, ee).call(this)
|
|
1068
|
-
e(this, q).update() && (this.dispose(), r(this, v, ee).call(this));
|
|
1069
|
-
}), window.addEventListener("resize", e(this, I));
|
|
1069
|
+
l(this, K, i), l(this, q, new Ae(e(this, K).images)), r(this, v, ee).call(this);
|
|
1070
1070
|
}
|
|
1071
1071
|
/**
|
|
1072
1072
|
* Debug
|
|
@@ -1082,7 +1082,7 @@ class ii {
|
|
|
1082
1082
|
* @returns {void}
|
|
1083
1083
|
*/
|
|
1084
1084
|
dispose() {
|
|
1085
|
-
cancelAnimationFrame(e(this, E)), window.removeEventListener("keydown", e(this, J)), window.removeEventListener("resize", e(this, I)), e(this, z).dispose(), e(this, P).dispose(), this.rendererManager.dispose(), this.debugManager.dispose();
|
|
1085
|
+
cancelAnimationFrame(e(this, E)), window.removeEventListener("keydown", e(this, J)), window.removeEventListener("resize", e(this, I)), e(this, z).dispose(), e(this, P).dispose(), this.rendererManager.dispose(), this.debugManager.dispose(), this.debugManager.element.remove();
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
1088
|
P = new WeakMap(), q = new WeakMap(), z = new WeakMap(), K = new WeakMap(), D = new WeakMap(), E = new WeakMap(), J = new WeakMap(), I = new WeakMap(), v = new WeakSet(), /**
|
|
@@ -1110,7 +1110,9 @@ ee = function() {
|
|
|
1110
1110
|
this.rendererManager = new Ce(
|
|
1111
1111
|
e(this, q).currentImage.width,
|
|
1112
1112
|
e(this, q).currentImage.height
|
|
1113
|
-
), l(this, z, new Me()), r(this, v, xe).call(this), r(this, v, Ne).call(this), e(this, K).containerSelector && r(this, v, Le).call(this, e(this, K).containerSelector),
|
|
1113
|
+
), l(this, z, new Me()), r(this, v, xe).call(this), r(this, v, Ne).call(this), e(this, K).containerSelector && r(this, v, Le).call(this, e(this, K).containerSelector), l(this, I, () => {
|
|
1114
|
+
e(this, q).update() && (this.dispose(), r(this, v, ee).call(this));
|
|
1115
|
+
}), window.addEventListener("resize", e(this, I)), r(this, v, $).call(this);
|
|
1114
1116
|
}, /**
|
|
1115
1117
|
* Init app
|
|
1116
1118
|
*
|