From 6688c90d279414d60b2a1ffe59993ad39c5f705b Mon Sep 17 00:00:00 2001 From: soufiane Date: Thu, 24 Aug 2023 12:41:13 +0200 Subject: [PATCH] wip #6194 @0:10 correctif animation runningman --- js/quiz.screens.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/quiz.screens.js b/js/quiz.screens.js index 368ca2c..08090a6 100644 --- a/js/quiz.screens.js +++ b/js/quiz.screens.js @@ -132,6 +132,7 @@ QuizScreens.prototype = { const $this = this; let screenToShow = $('[data-screen="' + screen + '"]'); this.hideCurrentScreen(function () { + $this.resetCountdownBackground() screenToShow.removeClass("none").addClass("next active-screen"); if (callback !== undefined) { callback(); @@ -160,7 +161,7 @@ QuizScreens.prototype = { opacity: 1, ease: "circ.out", onComplete: function () { - // if countdown enable + // if countdown enable we launch it if($this.quiz.question.current() !== undefined) { if (parseInt($this.quiz.question.current().countdown_enable)) { $this.countdown() @@ -232,7 +233,7 @@ QuizScreens.prototype = { this.runningManTimeout = setTimeout(() => { $this.quiz.animations.runningMan() $(".active-screen .runningman").css("opacity", 1) - }, 350) + }, 250) this.intervalCountDown = setInterval(function () { value -= (10 / time) * 100 @@ -256,6 +257,10 @@ QuizScreens.prototype = { } }, 10) }, + + resetCountdownBackground: function() { + document.documentElement.style.setProperty("--width-bg-countdown", "100%") + } }; export default QuizScreens; -- 2.39.5