From: Vincent Vanwaelscappel Date: Wed, 14 Feb 2024 13:25:10 +0000 (+0100) Subject: wait #6728 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=fbfb495c18819d4bc527db633e239f5f2e858145;p=fluidbook-toolbox-quiz.git wait #6728 @0.5 --- diff --git a/js/quiz.animations.js b/js/quiz.animations.js index d8534f4..ab7c4be 100644 --- a/js/quiz.animations.js +++ b/js/quiz.animations.js @@ -21,6 +21,9 @@ QuizAnimations.prototype = { // Load the animation "name" in container load: function (name, container, replace, loop = false, fit = 'default') { + if (replace === undefined) { + replace = []; + } let json = this.quiz.data.animations[name]; let renderSettings = {}; if (fit === 'cover') { @@ -128,8 +131,8 @@ QuizAnimations.prototype = { }, .7) }, - globalAnimations:function(){ - gsap.fromTo('#credits',{y:50} ,{y:0,duration:.5},0.35); + globalAnimations: function () { + gsap.fromTo('#credits', {y: 50}, {y: 0, duration: .5}, 0.35); } } diff --git a/js/quiz.resize.js b/js/quiz.resize.js index 964b290..ebebba6 100644 --- a/js/quiz.resize.js +++ b/js/quiz.resize.js @@ -125,6 +125,9 @@ QuizResize.prototype = { updateBackgrounds: function () { let $this = this; $('[data-bg]').each(function () { + if (!$this.quiz.utils.isVisible(this)) { + return; + } var v = $this.isMobile() ? $(this).attr('data-bg-m') : $(this).attr('data-bg-d'); if (v === undefined || v === null) { v = $(this).attr('data-bg-d');