]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6728 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 14 Feb 2024 13:25:10 +0000 (14:25 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 14 Feb 2024 13:25:10 +0000 (14:25 +0100)
js/quiz.animations.js
js/quiz.resize.js

index d8534f4e64ff8d740b66144d265a764a6e91c4d8..ab7c4bee89e5f49e8ac55c97b33823b2f323c4d7 100644 (file)
@@ -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);
     }
 }
 
index 964b2900179cdaa77e53675b751ff706528ac0ef..ebebba635cf3fb7a89c70f000d6e11cfcaf15e89 100644 (file)
@@ -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');