From 9d32fa1f9c178b67d353c5bb6f4dd83c9bea4344 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 22 Nov 2017 16:14:48 +0100 Subject: [PATCH] done #1806 @1.5 --- js/libs/fluidbook/fluidbook.js | 6 ++++-- style/fluidbook.less | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index d5e019dd..e166760d 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -492,7 +492,7 @@ Fluidbook.prototype = { } } - var center = this.centerBook(); + var center = this.centerBookEnabled(); res.center = 0; if (center) { if (newPage <= 1) { @@ -507,7 +507,7 @@ Fluidbook.prototype = { return res; }, - centerBook: function () { + centerBookEnabled: function () { return !!this.datas.centerBook && !this.displayOnePage && $('.tabslink').length == 0; }, @@ -681,6 +681,7 @@ Fluidbook.prototype = { var animationDuration = d <= 1 ? 0 : parseFloat(this.datas.mobileTransitionDuration); this.updateShadows(page, animationDuration); this.centerBook(turning.center, animationDuration); + $("#pagesnumbers").css('opacity', 0); try { this.search.clearHighlights(); @@ -734,6 +735,7 @@ Fluidbook.prototype = { $(this).trigger('fluidbook.page.change.end', [this.currentPage]); }, setPageNumbers: function () { + $("#pagesnumbers").css('opacity', 1); $("#pagesnumbers .left").html(this.getPageNumberOfSide('left')); $("#pagesnumbers .right").html(this.getPageNumberOfSide('right')); }, diff --git a/style/fluidbook.less b/style/fluidbook.less index 32ac8d96..36db4ef6 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -626,10 +626,12 @@ body, html { white-space: nowrap; pointer-events: none; font-size: unit(13*@z, px); - margin: 0.38em 0 0 0; + margin: 0.12em 0 0 0; top: @book-page-height; color: @page-number-color; .hideifnot(@display-page-number); + transition: opacity 250ms; + opacity: 0; > div { width: @book-page-width; -- 2.39.5