]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6183 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Jul 2023 13:06:51 +0000 (15:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Jul 2023 13:06:51 +0000 (15:06 +0200)
app/Elearning/QuizCompiler/Animations.php
resources/quizv2/js/quiz.animations.js
resources/quizv2/js/quiz.js

index 09133da4d7809c289e5c9f0b65b45aaa60fa54d4..39a61679445d4d2ade49dfdb56bee7f86bc3891f 100644 (file)
@@ -20,8 +20,7 @@ trait Animations
      */
     protected function writeAnimations()
     {
-        $colors = [self::OK_COLOR => /*$this->theme->okColor*/
-            '#ffcc00', self::NOK_COLOR => $this->theme->nokColor];
+        $colors = [self::OK_COLOR => $this->theme->okColor, self::NOK_COLOR => $this->theme->nokColor];
         $animationReplace = [];
 
         // Replace colors
index af3cb6ba8ff278217d8c1d34d2ba884a2941a720..94e87a686396ae032e9d78dd6096f5561b286902 100644 (file)
@@ -10,12 +10,12 @@ QuizAnimations.prototype = {
     load: function (name, container, replace) {
         let json = this.quiz.data.animations[name];
         $.each(replace, function (k, v) {
-            console.log(k,v);
+            console.log(k, v);
             json = json.replace(new RegExp(k, 'g'), v);
         });
 
         lottie.loadAnimation({
-            container: $('#anim').get(0),
+            container: $(container).get(0),
             renderer: 'svg',
             loop: false,
             autoplay: true,
index f6eee707e3714b50b85045a6084bb38f4966d7fb..5c4efd3d7cfa2faa6691fd5e0bcc3da8bb95fca1 100644 (file)
@@ -26,7 +26,7 @@ Quiz.prototype = {
         this.data = data;
         console.log(this.data);
         // ICI tout commence vraiment
-        this.animations.load('OK', $("#anim"), {'$text': 'Test d\'un message custom'});
+        this.animations.load('OK', $("#anim"), {'\\$text': 'Salut :)'});
 
         // La fonction resize est appellée à chaque fois qu'un resize de la fenêtre survient (et à l'init de l'app)
         $(window).on('resize', function () {