]> _ Git - fluidbook-html5.git/commitdiff
wip #7489 @5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Aug 2025 17:06:29 +0000 (19:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Aug 2025 17:06:29 +0000 (19:06 +0200)
js/libs/fluidbook/fluidbook.elasticslide.js
style/elasticslide.less

index 18b6c46f2af9db8686b982b753f52b43e9a563b2..be8228be920dd365467367f5693205655be9a9de 100644 (file)
@@ -59,8 +59,7 @@ FluidbookElasticSlide.prototype = {
 
         let w = parseFloat($("#fluidbook").css('width'));
         let h = w / this.fluidbook.pageRatio;
-        $("#elasticpages .scrollholder").css('height', h * this.fluidbook.settings.pages);
-        $("#elasticpages .page").css({height: h});
+        $("#elasticpages .page,#elasticpages .scrollholder").css({height: h});
     },
 
 };
\ No newline at end of file
index 088cb09609522301c79deb9e96d58464679a5e5d..bc76a3f5fe2e3941ccbf0c8cbdd2abd92459f25e 100644 (file)
@@ -1,15 +1,27 @@
 #elasticpages {
   height: 100%;
   width: 100%;
-  overflow: scroll;
+
 
   .scrollholder {
     position: relative;
     width: 100%;
+    height: 100%;
+    overflow-y: scroll;
+    overflow-x: hidden;
+    scroll-snap-type: y mandatory;
+    scroll-snap-stop: always;
+    -ms-overflow-style: none;
+    scrollbar-width: none;
+
+    &::-webkit-scrollbar {
+      display: none;
+    }
 
     .page {
       display: block;
       position: relative;
+      scroll-snap-align: center;
     }
   }
 }
\ No newline at end of file