]> _ Git - fluidbook-html5.git/commitdiff
fix #2775 @0:05
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 17 May 2019 16:40:14 +0000 (18:40 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 17 May 2019 16:40:14 +0000 (18:40 +0200)
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.mobilefirst.js

index 7256c8a9e40924768299b4a153ca3d3a7a52f67f..1243320b5a7ff66038fdf1781ab0f3221366f31e 100644 (file)
@@ -607,7 +607,7 @@ FluidbookMenu.prototype = {
                     var cw = 10 + 130 * this.fluidbook.datas.pages;
                     fullscreen = (cw >= ww * 0.9);
                     if (!fullscreen) {
-                        w = cw + 30;
+                        w = Math.max(400, cw + 30);
                     }
                 } else {
                     fullscreen = true;
@@ -666,7 +666,7 @@ FluidbookMenu.prototype = {
                         var cw = 10 + 130 * this.fluidbook.bookmarks.getBookmarkedGroups(true).length;
                         fullscreen = (cw >= ww * 0.9);
                         if (!fullscreen) {
-                            w = cw + 30;
+                            w = Math.max(400, cw + 30);
                         }
                     } else {
                         fullscreen = true;
index f80ef4fc3d55aaf8c223396cd89c0bede15f25e0..dbf915b4af62a915f6c0179a96eed6a3a06672be 100644 (file)
@@ -147,7 +147,6 @@ FluidbookMobileFirst.prototype = {
     },
 
     resizeIndex: function (repeat) {
-
         if (!this.enabled) {
             return;
         }
@@ -175,7 +174,6 @@ FluidbookMobileFirst.prototype = {
         var scrollAmount = Math.max(0, (indexHeight + funcHeight) - maxHeight);
 
         if (!isNaN(scrollAmount) && scrollAmount > 0) {
-
             var cutHeight = tallerHeight - scrollAmount;
             $(".indexViewHolder .pageholder img").each(function () {
                 var holder = $(this).closest('.pageholder');
@@ -209,11 +207,13 @@ FluidbookMobileFirst.prototype = {
         setTimeout(function () {
             $(".indexViewHolder").perfectScrollbar('update');
             $(".indexViewHolder").find('.ps__rail-x').addClass('ps--clicking');
-        }, 500)
+        }, 500);
+
         $(".indexViewHolder").perfectScrollbar({
             suppressScrollY: true,
             useBothWheelAxes: true
         });
+
         $(".indexViewHolder").find('.ps__rail-x').addClass('ps--clicking');
 
         if (repeat) {