]> _ Git - fluidbook-html5.git/commitdiff
wait #4424 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Apr 2021 08:29:13 +0000 (10:29 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Apr 2021 08:29:13 +0000 (10:29 +0200)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.links.js
style/fluidbook.less

index e80761966f184ded35abddecd9cd7640b928d030..1d519c5d9b2ce5ae2531c8a9c6aed90f3994251d 100644 (file)
@@ -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}});
     },
 
index 649f1c9c9d4d969f11883cc9e7b686dd5130f68b..2c385de895d8f1a3e4afc6e827a69aabea6f07ab 100644 (file)
@@ -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);
         }
index 4d57110a92885f6a1c374a91fc9f2fd4e05fb64b..8ea813484d92692f2bc5ba6f18c89e59ddd5e6ba 100644 (file)
@@ -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;
     }
   }