From: Vincent Vanwaelscappel Date: Tue, 27 Apr 2021 08:29:13 +0000 (+0200) Subject: wait #4424 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1d52fc6a99395871cb0e6631d19c21469bc5687c;p=fluidbook-html5.git wait #4424 @0.75 --- diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index e8076196..1d519c5d 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -411,19 +411,18 @@ Fluidbook.prototype = { if (args[1] === 'closeview') { return this.setCurrentPage(this.currentPage); } else if (args[1] === 'page') { + var anchor = false; if (fluidbook.settings.pageLabels[args[2]] !== undefined) { page = fluidbook.settings.pageLabels[args[2]]; + anchor = args[2]; } else { page = parseInt(args[2]); } + if (isNaN(page) || page == undefined) { return this.setCurrentPage('1'); } this.currentPageURL = page; - var anchor = false; - if (args.length > 3) { - anchor = args[3]; - } if (page !== $this.currentPage) { $($this).trigger('fluidbook.page.navigation', [page]); @@ -488,7 +487,7 @@ Fluidbook.prototype = { if (!this.mobilefirst.enabled) { return; } - var id = $('[data-anchor="anchor"]').attr('id'); + var id = $('[data-anchor="' + anchor + '"]').attr('id'); TweenMax.to($("#scroll"), 0.5, {scrollTo: {y: '#' + id, offsetY: $('header').outerHeight() + 10}}); }, diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index 649f1c9c..2c385de8 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -205,7 +205,6 @@ FluidbookLinks.prototype = { } var close = $(this).data('showclose'); - console.log(showid); $.each(showid, function (k, id) { $('div.link[data-id$="' + id + '"]').each(function () { var l = this; @@ -732,7 +731,6 @@ FluidbookLinks.prototype = { if (from.display !== undefined && from.display === 'none') { link.hide(); } - console.log(from, to); if (tweenmax) { TweenMax.fromTo(linkElement, duration, from, to); } diff --git a/style/fluidbook.less b/style/fluidbook.less index 4d57110a..8ea81348 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -270,6 +270,10 @@ body, html { #links .link { cursor: auto; + &.anchor { + pointer-events: none; + } + &.rightclone { display: none; @@ -2297,7 +2301,7 @@ ul.chapters.shareList a.level0 .svg-icon { pointer-events: auto; } - &[data-click-to-close="1"]{ + &[data-click-to-close="1"] { cursor: pointer; } }