]> _ Git - fluidbook-html5.git/commitdiff
wip #7867 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Nov 2025 11:00:21 +0000 (12:00 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Nov 2025 11:00:21 +0000 (12:00 +0100)
js/libs/fluidbook/fluidbook.mobilefirst.js

index e510306da1b562ff9598884b16afa77a883a87e9..9b5de5f691d57c34a575cce74e372d3236ee3d0a 100644 (file)
@@ -23,7 +23,7 @@ FluidbookMobileFirst.prototype = {
 
         document.getElementById('scroll').addEventListener('scroll', function () {
             $this.isScrolling = true;
-            $this.checkScroll($(this).scrollTop());
+            $this.checkScroll();
         }, {passive: true});
 
         document.getElementById('scroll').addEventListener('touchend', function () {
@@ -68,8 +68,12 @@ FluidbookMobileFirst.prototype = {
         }
         var $this = this;
         if (delay === undefined) {
-            delay = 800;
+            if (this.fluidbook.settings.mobilefirstLinksRevealDelay === undefined || null == this.fluidbook.settings.mobilefirstLinksRevealDelay) {
+                this.fluidbook.settings.mobilefirstLinksRevealDelay = 0.8;
+            }
+            delay = Math.max(0, parseFloat(this.fluidbook.settings.mobilefirstLinksRevealDelay) * 1000);
         }
+
         $("#links .link:not(.revealed):visible, .clinks [data-animations]:not(.revealed), .ctlinks [data-animations]:not(.revealed)").each(function () {
             var rect = $(this).get(0).getBoundingClientRect();
             if (rect.top === 0 && rect.left === 0 && rect.width === 0 && rect.height === 0) {