]> _ Git - fluidbook-html5.git/commitdiff
wip #1739 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Oct 2017 11:50:46 +0000 (13:50 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Oct 2017 11:50:46 +0000 (13:50 +0200)
js/libs/fluidbook/fluidbook.js

index c547a3bba1cccdf3e45c2cf3232c613b885e46ca..12ef158457b56fb67815f7e87e9609ece5b821b5 100644 (file)
@@ -491,7 +491,7 @@ Fluidbook.prototype = {
             }
         }
 
-        var center = !!this.datas.centerBook && !this.displayOnePage;
+        var center = this.centerBook();
         res.center = 0;
         if (center) {
             if (newPage <= 1) {
@@ -505,6 +505,11 @@ Fluidbook.prototype = {
         res = json_parse(JSON.stringify(res));
         return res;
     },
+
+    centerBook: function () {
+        return !!this.datas.centerBook && !this.displayOnePage && $('.tabslink').length == 0;
+    },
+
     reloadCurrentPage: function () {
         this.pageTransition(this.currentPage);
     },