]> _ Git - fluidbook-html5.git/commitdiff
wait #5364 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 20 Jul 2022 14:06:48 +0000 (16:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 20 Jul 2022 14:06:52 +0000 (16:06 +0200)
js/libs/fluidbook/fluidbook.tabs.js

index 0b1d0492553889e844bae9dc84177e2e86c82131..850950cc335827595f2875dd3250597596a5afd1 100644 (file)
@@ -158,12 +158,14 @@ FluidbookTabs.prototype = {
             var i = 0;
             $.each(sectionPages, function (k, value) {
                 if (value !== '-') {
+                    var activeLandscape = value;
                     if (!$this.fluidbook.alwaysDisplayOnePage && value % 2 === 1) {
-                        value--;
+                        activeLandscape--;
                     }
                     $this.links.push({
                         css: {height: (100 / nbPages) + '%', top: (100 / nbPages * i) + '%'},
                         page: parseInt(value),
+                        pageActiveLandscape: activeLandscape,
                         index: index,
                         id: 'o' + index
                     });
@@ -200,7 +202,8 @@ FluidbookTabs.prototype = {
             id = 'none';
         } else {
             $.each(this.links, function (k, v) {
-                if (page >= v.page) {
+                var active = $this.fluidbook.displayOnePage ? v.page : v.pageActiveLandscape;
+                if (page >= active) {
                     try {
                         if (v.last !== undefined && page >= v.last) {
                             id = 'none';