From: Vincent Vanwaelscappel Date: Thu, 22 Feb 2024 10:21:12 +0000 (+0100) Subject: wip #6743 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=123e9ac158d7ed03283e2809045d669ae1856651;p=fluidbook-html5.git wip #6743 @1 --- diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index fb4cc89a..2983929e 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -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) {