From ebce1b6f066a52d4efb0cd48cc6d7ef68d0bd551 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 16 Oct 2019 16:38:19 +0200 Subject: [PATCH] fix #3130 @0.5 --- js/libs/fluidbook/fluidbook.mobilefirst.js | 3 ++- js/libs/fluidbook/fluidbook.resize.js | 18 +++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.mobilefirst.js b/js/libs/fluidbook/fluidbook.mobilefirst.js index 908f3338..c618826b 100644 --- a/js/libs/fluidbook/fluidbook.mobilefirst.js +++ b/js/libs/fluidbook/fluidbook.mobilefirst.js @@ -5,6 +5,7 @@ function FluidbookMobileFirst(fluidbook) { this.transitioning = false; this.firstReveal = true; if (this.enabled) { + this.fluidbook.datas.logoHideWhenOverriden = false; this.fluidbook.displayOnePage = true; $("#fluidbook").wrap('
'); this.init(); @@ -121,7 +122,7 @@ FluidbookMobileFirst.prototype = { }, afterTransition: function (page) { - if(!this.transitioning){ + if (!this.transitioning) { return; } diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index e3849d9c..f7b17dbd 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -25,7 +25,8 @@ FluidbookResize.prototype = { }, setMargins: function () { - var marginY = 20; + var marginV = this.fluidbook.mobilefirst.enabled ? 36 : 20; + var marginY = marginV; var marginX = 60; if (this.reduceHorizontalMargins()) { @@ -34,7 +35,7 @@ FluidbookResize.prototype = { this.marginleft = marginX + parseInt(this.fluidbook.datas.extraXSpace); this.margintop = marginY + parseInt(this.fluidbook.datas.extraYSpace); - this.marginbottom = marginY + 20; + this.marginbottom = marginY + marginV; this.marginright = marginX + parseInt(this.fluidbook.datas.extraXSpace); }, @@ -55,7 +56,7 @@ FluidbookResize.prototype = { origin: [right, '100%'] }); - if(this.fluidbook.interface.arrowsEnabled()) { + if (this.fluidbook.interface.arrowsEnabled()) { $("#next").transform({ origin: [right, '50%'] }); @@ -174,7 +175,7 @@ FluidbookResize.prototype = { this.bookScale = Math.min(aw / fww, ah / fhh); var origin = ['50%', '50%']; if (this.fluidbook.mobilefirst.enabled) { - this.bookScale=this.fluidbook.mobilefirst.getBookScale(); + this.bookScale = this.fluidbook.mobilefirst.getBookScale(); origin[1] = '0%'; } @@ -226,7 +227,7 @@ FluidbookResize.prototype = { } } - if(this.fluidbook.interface.arrowsEnabled()) { + if (this.fluidbook.interface.arrowsEnabled()) { $("#next").transform({ scale: cssInterfaceScale, }); @@ -318,7 +319,7 @@ FluidbookResize.prototype = { }; - if(this.fluidbook.interface.arrowsEnabled()) { + if (this.fluidbook.interface.arrowsEnabled()) { try { data.arrowLeftRect = $("#previous").get(0).getBoundingClientRect(); data.arrowRightRect = $("#next").get(0).getBoundingClientRect(); @@ -331,7 +332,7 @@ FluidbookResize.prototype = { }, resizeNav: function (interfaceScale) { var $this = this; - if(this.fluidbook.interface.arrowsEnabled()) { + if (this.fluidbook.interface.arrowsEnabled()) { var topNext = (this.hh - (100 * interfaceScale)) / 2; $("#next,#previous").css({ top: topNext @@ -356,6 +357,9 @@ FluidbookResize.prototype = { }, checkLogoVisibility: function () { + if(this.fluidbook.mobilefirst.enabled){ + return; + } var logo = document.getElementById("logo").getBoundingClientRect(); var fluidbook = document.getElementById("fluidbook").getBoundingClientRect(); var hidden = logo.bottom > fluidbook.top && logo.left < (fluidbook.right - $("#center-fluidbook").data('left')); -- 2.39.5