flipbookengine 0.1.6 → 0.1.7
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/flipbook-engine.js
CHANGED
|
@@ -19045,7 +19045,7 @@ const Bl = class Bl {
|
|
|
19045
19045
|
M(this, "initialized", !1);
|
|
19046
19046
|
M(this, "resizeObserver", null);
|
|
19047
19047
|
M(this, "state", { showThumbs: !0, isSingle: !1, currentPage: 0, orientation: "landscape" });
|
|
19048
|
-
M(this, "touchStartX",
|
|
19048
|
+
M(this, "touchStartX", null);
|
|
19049
19049
|
M(this, "flipState", "read");
|
|
19050
19050
|
this.selector = I, this.options = g, this.options = { allowDownload: !0, showThumbs: !0, primaryColor: "#7367f0", theme: "auto", ...g }, this.messages = r0({ locale: this.options.locale, messages: this.options.messages }), this.options.showThumbs !== void 0 && (this.state.showThumbs = this.options.showThumbs);
|
|
19051
19051
|
}
|
|
@@ -19517,11 +19517,11 @@ const Bl = class Bl {
|
|
|
19517
19517
|
}, { passive: !1, signal: I }), window.addEventListener("touchmove", (t) => {
|
|
19518
19518
|
this.zoomState.isActive && t.touches.length === 1 && (t.preventDefault(), this.handleDragMove(t.touches[0].clientX, t.touches[0].clientY));
|
|
19519
19519
|
}, { passive: !1, signal: I }), window.addEventListener("touchend", (t) => {
|
|
19520
|
-
if (!this.zoomState.isActive && this.state.isSingle && t.changedTouches.length === 1) {
|
|
19520
|
+
if (this.touchStartX !== null && !this.zoomState.isActive && this.state.isSingle && t.changedTouches.length === 1) {
|
|
19521
19521
|
const N = t.changedTouches[0].clientX - this.touchStartX;
|
|
19522
19522
|
N < -50 ? this.goNext() : N > 50 && this.goPrev();
|
|
19523
19523
|
}
|
|
19524
|
-
this.handleDragEnd();
|
|
19524
|
+
this.touchStartX = null, this.handleDragEnd();
|
|
19525
19525
|
}, { signal: I }), (n = this.ui.fullscreen) == null || n.addEventListener("click", () => {
|
|
19526
19526
|
const t = this.ui.wrapper;
|
|
19527
19527
|
!document.fullscreenElement && t ? t.requestFullscreen().catch((N) => console.log(N)) : document.exitFullscreen();
|