From 9646d18c0458062420133e4dad466b53d6ac8570 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 30 May 2022 16:51:56 +0200 Subject: [PATCH] wait #5299 @2 --- js/libs/fluidbook/fluidbook.links.js | 20 +++++++++----------- style/fluidbook.less | 9 ++++++++- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index 4252d07e..ef72ae08 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -659,6 +659,7 @@ FluidbookLinks.prototype = { link = $(link); var linkElement = $(link).get(0); + var animatedElement = linkElement; if (animation.type === undefined || animation.type === '') { animation.type = 'none'; } @@ -736,16 +737,13 @@ FluidbookLinks.prototype = { to.y = animation.y; } else if (animation.type === 'zoomin' || animation.type === 'zoomout') { - var s = (100 * animation.scale) + "%"; - from.backgroundPosition = to.backgroudPosition = animation.transformorigin; - from.backgroundSize = animation.type === 'zoomin' ? '100% 100%' : s + ' ' + s; - to.backgroundSize = animation.type === 'zoomout' ? '100% 100%' : s + ' ' + s; - //to.visibility = 'visible'; - if (Modernizr.firefox) { - to.force3D = true; - from.rotation += 0.01; - to.rotation = from.rotation; - } + to.display = 'block'; + to.visibility = 'visible'; + + from.scale = animation.type === 'zoomin' ? 1 : animation.scale; + to.scale = animation.type === 'zoomout' ? 1 : animation.scale; + animatedElement = $(linkElement).find('img'); + from.transformOrigin = to.transformOrigin = animation.transformorigin; } else if (animation.type === 'fadein') { from.display = 'none'; to.display = 'block'; @@ -934,7 +932,7 @@ FluidbookLinks.prototype = { } if (usegsap) { to.duration = duration; - var a = gsap.fromTo(linkElement, from, to); + var a = gsap.fromTo(animatedElement, from, to); if (!autoStart) { a.play() setTimeout(function () { diff --git a/style/fluidbook.less b/style/fluidbook.less index 0f392c2b..30123249 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -1535,6 +1535,7 @@ html.ios body.portrait #interface { z-index: 500; position: absolute; pointer-events: none; + overflow: hidden; &.interactive { pointer-events: auto; @@ -1552,6 +1553,12 @@ html.ios body.portrait #interface { &[data-animation-hide] { display: none; } + + img { + width: 100%; + height: 100%; + display: block; + } } @links-area-color: fadeout(@links-color, 70%); @@ -3065,7 +3072,7 @@ body > input { } } -@rolloverDuration:250ms; +@rolloverDuration: 250ms; [data-rollover="upanddown"] { &.animaterollover { -- 2.39.5