Fix slideshow transition

This commit is contained in:
klmp200 committed 2025-09-22 23:06:18 +02:00
1 parent 95e6fff98b
commit 4701c0804b
3 files changed
+38 -5

No files matched your search

@@ -12,11 +12,13 @@ document.addEventListener("alpine:init", () => {
elapsed: 0,
current: 0,
previous: 0,
init() {
this.$watch("elapsed", () => {
const displayTime = this.posters[this.current].displayTime * 1000;
if (this.elapsed > displayTime) {
this.previous = this.current;
this.current = this.getNext();
this.elapsed = 0;
}