From: Vincent Vanwaelscappel Date: Wed, 27 May 2020 17:02:00 +0000 (+0200) Subject: wip #3661 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=de3bebd4c7d7b62172bd5ec4cd378a4eecdff0c5;p=fluidbook-html5.git wip #3661 @1 --- diff --git a/js/libs/fluidbook/fluidbook.contentlock.js b/js/libs/fluidbook/fluidbook.contentlock.js index a0ffee83..7b805442 100644 --- a/js/libs/fluidbook/fluidbook.contentlock.js +++ b/js/libs/fluidbook/fluidbook.contentlock.js @@ -71,6 +71,7 @@ FluidbookContentLock.prototype = { ); this.fluidbook.hideUnnecessaryButtons(); + this.fluidbook.mobilefirst.refreshFooterNavigation(); resize(); }, diff --git a/js/libs/fluidbook/fluidbook.mobilefirst.js b/js/libs/fluidbook/fluidbook.mobilefirst.js index 26907c12..634781b1 100644 --- a/js/libs/fluidbook/fluidbook.mobilefirst.js +++ b/js/libs/fluidbook/fluidbook.mobilefirst.js @@ -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;