mirror of
https://github.com/ae-utbm/sith.git
synced 2025-10-10 00:34:41 +00:00
Fix slideshow transition
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user