]> _ Git - fluidbook-html5.git/commitdiff
wait #2815 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 3 Jun 2019 15:29:44 +0000 (17:29 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 3 Jun 2019 15:29:44 +0000 (17:29 +0200)
js/libs/fluidbook/fluidbook.resize.js

index a9483213fcf0553c1309221a852a23a28bb53f1b..43b5c3da153fab6bba6f403ec7cb88a45da1da52 100644 (file)
@@ -111,14 +111,18 @@ FluidbookResize.prototype = {
         var headerScale = 1;
 
         var interfaceScale, headerScale;
-        if (this.orientation == 'landscape') {
+        if (this.orientation === 'landscape') {
             interfaceScale = Math.min(1, this.ww / this.referenceWidthLandscape, this.hh / this.referenceHeight);
-        } else if (this.orientation == 'portrait') {
+        } else if (this.orientation === 'portrait') {
             var nminwidth = ($("#nav a").length * 51) + 205 + 50;
             var refWidth = Math.max(this.referenceWidthPortrait, nminwidth);
             headerScale = Math.min(1, this.ww / refWidth, this.hh / this.referenceHeight);
             interfaceScale = Math.min(1, 0.7 * this.ww / refWidth, 0.7 * this.hh / this.referenceHeight);
         }
+        if (this.fluidbook.mobilefirst.enabled) {
+            interfaceScale = Math.max(0.8, interfaceScale);
+            headerScale = Math.max(0.8, headerScale)
+        }
         this.interfaceScale = interfaceScale;
         this.headerScale = headerScale;