]> _ Git - fluidbook-html5.git/commitdiff
wip #6743 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 22 Feb 2024 10:21:12 +0000 (11:21 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 22 Feb 2024 10:21:12 +0000 (11:21 +0100)
js/libs/fluidbook/fluidbook.links.js

index fb4cc89a1b1367e7db130faea69632945ff74430..2983929e3af063fda96a06a21b3ff6138c1b5611 100644 (file)
@@ -892,7 +892,27 @@ FluidbookLinks.prototype = {
         if (animation.delay !== undefined) {
             to.delay = parseFloat(animation.delay);
         }
-        if (animation.type === 'scalefrom') {
+
+        if (animation.type === 'blurfrom') {
+            animation.type = "blur";
+            animation.from = 1;
+        }
+
+        if (animation.type === 'blur') {
+            let b = 'blur(' + animation.blur + 'px)';
+            let zero = 'blur(0px)';
+            if (css.filter === undefined) {
+                css.filter = '';
+            }
+
+            if (animation.from) {
+                css.filter += ' ' + b;
+                to.filter = zero;
+            } else {
+                css.filter = ' ' + b;
+                to.filter = b;
+            }
+        } else if (animation.type === 'scalefrom') {
             to.display = 'block';
             to.visibility = 'visible';
 
@@ -1144,6 +1164,7 @@ FluidbookLinks.prototype = {
         if (usegsap) {
             to.duration = duration;
             let anim = gsap.fromTo(animatedElement, from, to);
+            console.log(animatedElement, from, to, anim);
 
             let anims = [];
             if ($(link).data('gsap') !== undefined) {