From 491640e3e739793a3b20cb1f36bb5621fccf5be3 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 3 Feb 2025 17:37:21 +0100 Subject: [PATCH] wip #7301 @2 --- js/libs/fluidbook/fluidbook.links.animations.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.links.animations.js b/js/libs/fluidbook/fluidbook.links.animations.js index 526c8209..77df7283 100644 --- a/js/libs/fluidbook/fluidbook.links.animations.js +++ b/js/libs/fluidbook/fluidbook.links.animations.js @@ -71,6 +71,7 @@ FluidbookLinksAnimations.prototype = { var tweenFunctions = {}; var duration = 0.5; var usegsap = true; + var initTransform = $(link).css('transform'); animation = $.extend({}, globalDefault, defaultParams, animation); @@ -94,7 +95,7 @@ FluidbookLinksAnimations.prototype = { css.backgroundSize = '100% 100%'; css.backgroundPosition = animation.transformorigin; } else { - css.transform = 'scale(' + animation.scale + ')'; + css.transform = initTransform + ' scale(' + animation.scale + ')'; css.transformOrigin = animation.transformorigin; } } @@ -220,13 +221,13 @@ FluidbookLinksAnimations.prototype = { /** * Rename animation direction name */ - if(!animation.direction) { + if (!animation.direction) { animation.direction = 'right' } - if(animation.direction === 'top') { + if (animation.direction === 'top') { animation.direction = 'up' } - if(animation.direction === 'bottom') { + if (animation.direction === 'bottom') { animation.direction = 'down' } @@ -359,7 +360,7 @@ FluidbookLinksAnimations.prototype = { countup.start(); }, to.delay * 1000); } else if (animation.type === 'draggable') { - if(this.fluidbook===false){ + if (this.fluidbook === false) { return; } this.fluidbook.hasDraggableOnPage(true); -- 2.39.5