]> _ Git - Animations.git/commitdiff
wait #5182 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 29 Mar 2022 15:48:47 +0000 (17:48 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 29 Mar 2022 15:48:47 +0000 (17:48 +0200)
ThermofisherProgressbar/cache.svg
ThermofisherProgressbar/index.html

index 74fa7005b0b1c96850b389ecf11c7b2a84513a05..10a267b978a5683c4045779669aecd7e83dba835 100644 (file)
@@ -3,14 +3,18 @@
 <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
         viewBox="0 0 215 20" style="enable-background:new 0 0 215 20;" xml:space="preserve">
 <style type="text/css">
-       .st0{fill:#FFFFFF;}
-       .st1{fill:#E3E3E3;}
+       .st0{fill:#E71316;}
+       .st1{fill:#FFFFFF;}
+       .st2{fill:#E3E3E3;}
 </style>
 <g>
-       <path class="st0" d="M0,0v20h215V0H0z M203,15h-20.9V6H203c2.5,0,4.5,2,4.5,4.5S205.5,15,203,15z M11,6h20.9v9H11
+       <path class="st0" d="M203,15h-20.9V6H203c2.5,0,4.5,2,4.5,4.5S205.5,15,203,15z M11,6h20.9v9H11c-2.5,0-4.5-2-4.5-4.5S8.5,6,11,6z
+                M181.4,6v9h-24.2V6H181.4z M156.5,6v9h-24.2V6H156.5z M131.5,6v9h-24.2V6H131.5z M106.6,6v9H82.5V6H106.6z M81.7,6v9H57.5V6H81.7z
+                M56.8,6v9H32.6V6H56.8z"/>
+       <path class="st1" d="M0,0v20h215V0H0z M203,15h-20.9V6H203c2.5,0,4.5,2,4.5,4.5S205.5,15,203,15z M11,6h20.9v9H11
                c-2.5,0-4.5-2-4.5-4.5S8.5,6,11,6z M181.4,6v9h-24.2V6H181.4z M156.5,6v9h-24.2V6H156.5z M131.5,6v9h-24.2V6H131.5z M106.6,6v9
                H82.5V6H106.6z M81.7,6v9H57.5V6H81.7z M56.8,6v9H32.6V6H56.8z"/>
-       <path class="st1" d="M203,4.5H11c-1.7,0-3.2,0.7-4.2,1.8C5.7,7.4,5,8.9,5,10.5c0,3.3,2.7,6,6,6h192c1.7,0,3.2-0.7,4.2-1.8
+       <path class="st2" d="M203,4.5H11c-1.7,0-3.2,0.7-4.2,1.8C5.7,7.4,5,8.9,5,10.5c0,3.3,2.7,6,6,6h192c1.7,0,3.2-0.7,4.2-1.8
                c1.1-1.1,1.8-2.6,1.8-4.2C209,7.2,206.3,4.5,203,4.5z M31.9,15H11c-2.5,0-4.5-2-4.5-4.5S8.5,6,11,6h20.9V15z M56.8,15H32.6V6h24.2
                V15z M81.7,15H57.5V6h24.2V15z M106.6,15H82.5V6h24.2L106.6,15L106.6,15z M131.5,15h-24.2V6h24.2V15z M156.5,15h-24.2V6h24.2V15z
                 M181.4,15h-24.2V6h24.2V15z M203,15h-20.9V6H203c2.5,0,4.5,2,4.5,4.5S205.5,15,203,15z"/>
index f233e8440b6c45987aefdc63b7f2c556fe9620b5..ff24990399970dcd20f173a9ac276d9ae8b01c18 100644 (file)
 
         function update() {
             var x = [0, 32.5, 57.3, 82, 107.2, 132, 157, 182, 215];
-            var coins = 8;
+            var coins = 4;
             try {
-                coins = Math.max(0, Math.min(x.length, parseInt(parent.fluidbook.gamify.getTotalCoins('S'))));
+                coins = Math.max(0, Math.min(x.length - 1, parseInt(parent.fluidbook.gamify.getTotalCoins('S'))));
             } catch (e) {
 
             }
 
 
-            var clipLeft = round(100 * (x[coins] / 215)) + '%';
-            var clipPath = 'inset(100% 100% 100% ' + clipLeft + ')';
-            document.getElementById('cache').style.clipPath = clipPath;
+            var clipLeft = Math.round(window.innerWidth * (x[coins] / 215)) + "px";
+            var clipPath = 'rect(0px,' + clipLeft + ',' + (window.innerHeight) + 'px,0px)';
+            document.getElementById('cache').style.clip = clipPath;
         }
 
         document.addEventListener("DOMContentLoaded", function () {