]> _ Git - fluidbook-html5.git/commitdiff
done #1806 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Nov 2017 15:14:48 +0000 (16:14 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Nov 2017 15:14:48 +0000 (16:14 +0100)
js/libs/fluidbook/fluidbook.js
style/fluidbook.less

index d5e019ddb5341ea8b5e61832d9807fe67b63dbc1..e166760dd7ba689e8d195a3f1f7ea0c2e4f9b610 100644 (file)
@@ -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'));
     },
index 32ac8d967d756d8aec6ea6816c53a9bbf3158b82..36db4ef6dd161e4d9645aabf38d01e153910e9c8 100644 (file)
@@ -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;