From c09dd726b09deb36d64a5596e81fe8cdf13c6bc3 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 17 May 2021 16:32:16 +0200 Subject: [PATCH] wip #4470 @1.5 --- js/libs/fluidbook/fluidbook.links.js | 7 +++++-- js/libs/fluidbook/fluidbook.mobilefirst.js | 6 +++++- style/mobilefirst.less | 12 +++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index 383cecff..99edd62a 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -529,7 +529,6 @@ FluidbookLinks.prototype = { var duration = 0.5; var tweenmax = true; - animation = $.extend({}, globalDefault, defaultParams, animation); if (animation.duration !== undefined) { @@ -550,6 +549,7 @@ FluidbookLinks.prototype = { if (animation.type === 'translatefrom') { from.display = 'none'; to.display = 'block'; + to.visibility='visible'; from.x = animation.x; from.y = animation.y; @@ -559,6 +559,7 @@ FluidbookLinks.prototype = { } else if (animation.type === 'translate') { from.display = 'none'; to.display = 'block'; + to.visibility='visible'; from.x = 0; from.y = 0; to.x = animation.x; @@ -569,6 +570,7 @@ FluidbookLinks.prototype = { from.backgroundPosition = to.backgroudPosition = '50% 50%'; 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; to.rotation = 0.01; @@ -577,6 +579,7 @@ FluidbookLinks.prototype = { } else if (animation.type === 'fadein') { from.display = 'none'; to.display = 'block'; + to.visibility='visible'; from.opacity = 0; to.opacity = 1; } else if (animation.type === 'fadeout') { @@ -586,6 +589,7 @@ FluidbookLinks.prototype = { if (animation.type === 'reveal') { from.display = 'none'; to.display = 'block'; + to.visibility='visible'; } var top = 0; @@ -735,7 +739,6 @@ FluidbookLinks.prototype = { link.hide(); } if (tweenmax) { - console.log(from, to); TweenMax.fromTo(linkElement, duration, from, to); } this.fluidbook.networkControl.pause((to.delay + duration + 0.5) * 1000); diff --git a/js/libs/fluidbook/fluidbook.mobilefirst.js b/js/libs/fluidbook/fluidbook.mobilefirst.js index 8220a859..7944e006 100644 --- a/js/libs/fluidbook/fluidbook.mobilefirst.js +++ b/js/libs/fluidbook/fluidbook.mobilefirst.js @@ -71,7 +71,11 @@ FluidbookMobileFirst.prototype = { var delay = 800; $("#links .link:not(.revealed):visible, .clinks [data-animations]:not(.revealed)").each(function () { var rect = $(this).get(0).getBoundingClientRect(); + if (rect.top === 0 && rect.left === 0 && rect.width === 0 && rect.height === 0) { + return; + } if (rect.top < $this.fluidbook.resize.hh) { + console.log($(this).attr('id'), rect.top, $this.fluidbook.resize.hh); $(this).addClass('revealed'); if ($(this).find('a.displayArea').length > 0) { $this.fluidbook.links.animateLink(this, delay); @@ -175,7 +179,7 @@ FluidbookMobileFirst.prototype = { }, refreshFooterNavigation: function (page) { - if(!this.enabled){ + if (!this.enabled) { return; } if (page === undefined) { diff --git a/style/mobilefirst.less b/style/mobilefirst.less index 1d5e3575..e3dcb10a 100644 --- a/style/mobilefirst.less +++ b/style/mobilefirst.less @@ -101,6 +101,10 @@ } } + .link.contentLink[data-animation-hide] { + display: block; + visibility: hidden; + } #helpView .interface { display: block; @@ -142,11 +146,13 @@ } } } + .mview[data-menu="index"] { .content { overflow-x: auto; } - .ps__rail-x{ + + .ps__rail-x { display: block; } } @@ -160,8 +166,8 @@ opacity: 0; transition: opacity 250ms; - .thumb .number{ - padding-top:10px; + .thumb .number { + padding-top: 10px; } .here { -- 2.39.5