]> _ Git - fluidbook-html5.git/commitdiff
fix #3130 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Oct 2019 14:38:19 +0000 (16:38 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Oct 2019 14:38:19 +0000 (16:38 +0200)
js/libs/fluidbook/fluidbook.mobilefirst.js
js/libs/fluidbook/fluidbook.resize.js

index 908f333821e9ae658fe772d588372ab303a52e5b..c618826bb2808028f2e03970ae1ba08f02bfb1e9 100644 (file)
@@ -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('<div id="scroll"></div>');
         this.init();
@@ -121,7 +122,7 @@ FluidbookMobileFirst.prototype = {
     },
 
     afterTransition: function (page) {
-        if(!this.transitioning){
+        if (!this.transitioning) {
             return;
         }
 
index e3849d9cd1bcc28c9a2ae5ce8ffa588a7c63f1f5..f7b17dbd2e69168c331f7172e575de340b701044 100644 (file)
@@ -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'));