From 88aad7c99bc20e654c76d9a810a3077ee5effe00 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 27 Sep 2019 19:55:01 +0200 Subject: [PATCH] fix #3084 @4 --- js/libs/fluidbook/fluidbook.loader.js | 3 +++ js/libs/fluidbook/fluidbook.mobilefirst.js | 4 ++++ js/libs/fluidbook/fluidbook.resize.js | 4 ++-- style/fluidbook.less | 5 ----- style/mobilefirst.less | 21 +++++++++++---------- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.loader.js b/js/libs/fluidbook/fluidbook.loader.js index 81aaf324..6ced7c76 100644 --- a/js/libs/fluidbook/fluidbook.loader.js +++ b/js/libs/fluidbook/fluidbook.loader.js @@ -25,6 +25,9 @@ FluidbookLoader.prototype = { getPageDimensions: function (page, width) { var dim = this.fluidbook.datas.pagesDimensions[page]; + if(dim===undefined){ + console.log(page); + } var height; if (undefined === width) { width = dim[0]; diff --git a/js/libs/fluidbook/fluidbook.mobilefirst.js b/js/libs/fluidbook/fluidbook.mobilefirst.js index 049f2eae..c22faf2b 100644 --- a/js/libs/fluidbook/fluidbook.mobilefirst.js +++ b/js/libs/fluidbook/fluidbook.mobilefirst.js @@ -139,6 +139,10 @@ FluidbookMobileFirst.prototype = { $("#pages").css('maxHeight', h); }, + getBookScale: function () { + return Math.min(620, this.fluidbook.resize.ww * 0.9) / this.fluidbook.datas.width; + }, + getFooterNavigation: function (page) { var visibility = this.fluidbook.getButtonsVisibility(page); var footer = '
'; diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 25b0787b..e3849d9c 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -167,14 +167,14 @@ FluidbookResize.prototype = { var ah = this.hh - marginTop - marginBottom; var fhh = this.fluidbook.datas.height; var fww = this.fluidbook.datas.width; - if (this.orientation == 'landscape') { + if (this.orientation === 'landscape') { fww *= 2; } this.bookScale = Math.min(aw / fww, ah / fhh); var origin = ['50%', '50%']; if (this.fluidbook.mobilefirst.enabled) { - this.bookScale = Math.min(aw / fww, 1); + this.bookScale=this.fluidbook.mobilefirst.getBookScale(); origin[1] = '0%'; } diff --git a/style/fluidbook.less b/style/fluidbook.less index d3bb4a85..8cd5e27e 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -973,11 +973,6 @@ footer { opacity: 0; z-index: 0; } - - .mobilefirst & { - display: none; - } - } a.bookmark { diff --git a/style/mobilefirst.less b/style/mobilefirst.less index d430b337..c67bebc1 100644 --- a/style/mobilefirst.less +++ b/style/mobilefirst.less @@ -1,15 +1,16 @@ .mobilefirst { #shadow { - box-shadow: rgba(0, 0, 0, @shadow-opacity) 0 0 10px; - - .shadow.bottom { - height: 80px; - bottom: -80px; - background-size: unit(@book-page-width - 10, px) 80px; - background-position: 50% 100%; - background-repeat: no-repeat; - opacity: @shadow-opacity*0.25; - } + display: none; + //box-shadow: rgba(0, 0, 0, @shadow-opacity) 0 0 10px; + // + //.shadow.bottom { + // height: 80px; + // bottom: -80px; + // background-size: unit(@book-page-width - 10, px) 80px; + // background-position: 50% 100%; + // background-repeat: no-repeat; + // opacity: @shadow-opacity*0.25; + //} } #main, #fluidbook { -- 2.39.5