From: Vincent Date: Fri, 15 Dec 2017 14:25:54 +0000 (+0100) Subject: wait #1710 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=52bc7c71df07b00e0ae71d6badfee0d3b00d4f35;p=fluidbook-html5.git wait #1710 @0:10 --- diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 204db722..30d31364 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -11,6 +11,7 @@ function FluidbookResize(fluidbook) { this.textScale = 2; this.bookScale = 1; this.interfaceScale = 1; + this.headerScale = 1; this.navScale = 1; this.ww = $(window).width(); this.hh = $(window).height(); @@ -77,22 +78,24 @@ FluidbookResize.prototype = { this.updateWindow(); } - var interfaceScale; + var interfaceScale, headerScale; if (this.orientation == 'landscape') { interfaceScale = Math.min(1, this.ww / this.referenceWidthLandscape, this.hh / this.referenceHeight); } else if (this.orientation == 'portrait') { var nminwidth = ($("#nav a").length * 51) + 205 + 50; var refWidth = Math.max(this.referenceWidthPortrait, nminwidth); - - interfaceScale = Math.min(1, this.ww / refWidth * 0.7, this.hh / this.referenceHeight * 0.7); + 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); } this.interfaceScale = interfaceScale; + this.headerScale = headerScale; - var navScale = interfaceScale * parseInt(this.fluidbook.datas.mobileNavScale) / 100; + var navScale = headerScale * parseInt(this.fluidbook.datas.mobileNavScale) / 100; this.navScale = navScale; var cssInterfaceScale = [interfaceScale, interfaceScale]; var cssNavScale = [navScale, navScale]; + var cssHeaderScale = [headerScale, headerScale]; $("#main,#z").css({ width: this.ww,