]> _ Git - fluidbook-html5.git/commitdiff
wip #3661 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 27 May 2020 17:02:00 +0000 (19:02 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 27 May 2020 17:02:00 +0000 (19:02 +0200)
js/libs/fluidbook/fluidbook.contentlock.js
js/libs/fluidbook/fluidbook.mobilefirst.js

index a0ffee831329a766001f844efa12580c47f516ae..7b80544271dd1ff6f4526700378467844f4b4c1f 100644 (file)
@@ -71,6 +71,7 @@ FluidbookContentLock.prototype = {
         );
 
         this.fluidbook.hideUnnecessaryButtons();
+        this.fluidbook.mobilefirst.refreshFooterNavigation();
         resize();
     },
 
index 26907c12f58e75b5e57355c3e1b444c83edc772d..634781b1f3c56ea4edd3c4f4b9e69208c5bd2958 100644 (file)
@@ -59,7 +59,6 @@ FluidbookMobileFirst.prototype = {
         var reveal = $(nav).find('.reveal');
         var navrect = nav.get(0).getBoundingClientRect();
         if (navrect.top < this.fluidbook.resize.hh && reveal.hasClass('toreveal')) {
-
             reveal.removeClass('toreveal');
         }
     },
@@ -126,8 +125,7 @@ FluidbookMobileFirst.prototype = {
             return;
         }
 
-        $('#pages .mf-nav').remove();
-        $("#pages").append(this.getFooterNavigation(page));
+        this.refreshFooterNavigation(page);
 
         $("#pages .mf-nav").css('opacity', 1);
         $('#pages .mf-nav .reveal').addClass('toreveal');
@@ -176,6 +174,17 @@ FluidbookMobileFirst.prototype = {
         return footer;
     },
 
+    refreshFooterNavigation: function (page) {
+        if(!this.enabled){
+            return;
+        }
+        if (page === undefined) {
+            page = this.fluidbook.currentPage;
+        }
+        $('#pages .mf-nav').remove();
+        $("#pages").append(this.getFooterNavigation(page));
+    },
+
     resizeIndex: function (repeat) {
         if (!this.enabled) {
             return;