]> _ Git - fluidbook-html5.git/commitdiff
fix #3084 @4
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Sep 2019 17:55:01 +0000 (19:55 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Sep 2019 17:55:01 +0000 (19:55 +0200)
js/libs/fluidbook/fluidbook.loader.js
js/libs/fluidbook/fluidbook.mobilefirst.js
js/libs/fluidbook/fluidbook.resize.js
style/fluidbook.less
style/mobilefirst.less

index 81aaf3240380d760476ed520dce4a20febb9225c..6ced7c76b03c22efa8a0fd0a801d6cb407d5f57d 100644 (file)
@@ -25,6 +25,9 @@ FluidbookLoader.prototype = {
 
     getPageDimensions: function (page, width) {
         var dim = this.fluidbook.datas.pagesDimensions[page];
+        if(dim===undefined){
+            console.log(page);
+        }
         var height;
         if (undefined === width) {
             width = dim[0];
index 049f2eae6d4f5750c9a634e444bb46ff280db001..c22faf2b03bac7b1afc2e4d018b27fbf4c6322e9 100644 (file)
@@ -139,6 +139,10 @@ FluidbookMobileFirst.prototype = {
         $("#pages").css('maxHeight', h);
     },
 
+    getBookScale: function () {
+        return Math.min(620, this.fluidbook.resize.ww * 0.9) / this.fluidbook.datas.width;
+    },
+
     getFooterNavigation: function (page) {
         var visibility = this.fluidbook.getButtonsVisibility(page);
         var footer = '<div class="mf-nav"><div class="reveal">';
index 25b0787bae6417e3b0532abc473bca7937ee0089..e3849d9cd1bcc28c9a2ae5ce8ffa588a7c63f1f5 100644 (file)
@@ -167,14 +167,14 @@ FluidbookResize.prototype = {
         var ah = this.hh - marginTop - marginBottom;
         var fhh = this.fluidbook.datas.height;
         var fww = this.fluidbook.datas.width;
-        if (this.orientation == 'landscape') {
+        if (this.orientation === 'landscape') {
             fww *= 2;
         }
 
         this.bookScale = Math.min(aw / fww, ah / fhh);
         var origin = ['50%', '50%'];
         if (this.fluidbook.mobilefirst.enabled) {
-            this.bookScale = Math.min(aw / fww, 1);
+            this.bookScale=this.fluidbook.mobilefirst.getBookScale();
             origin[1] = '0%';
         }
 
index d3bb4a85509c31f09397ddbe0f72678ee707c138..8cd5e27e4696b0673c5637d9f136b69b3d5dfa33 100644 (file)
@@ -973,11 +973,6 @@ footer {
     opacity: 0;
     z-index: 0;
   }
-
-  .mobilefirst & {
-    display: none;
-  }
-
 }
 
 a.bookmark {
index d430b337072ccb7eb6d44da8fd44e56efb0ab30a..c67bebc1ecfffb37ff3ac93fcb40862991b4c1c2 100644 (file)
@@ -1,15 +1,16 @@
 .mobilefirst {
   #shadow {
-    box-shadow: rgba(0, 0, 0, @shadow-opacity) 0 0 10px;
-
-    .shadow.bottom {
-      height: 80px;
-      bottom: -80px;
-      background-size: unit(@book-page-width - 10, px) 80px;
-      background-position: 50% 100%;
-      background-repeat: no-repeat;
-      opacity: @shadow-opacity*0.25;
-    }
+    display: none;
+    //box-shadow: rgba(0, 0, 0, @shadow-opacity) 0 0 10px;
+    //
+    //.shadow.bottom {
+    //  height: 80px;
+    //  bottom: -80px;
+    //  background-size: unit(@book-page-width - 10, px) 80px;
+    //  background-position: 50% 100%;
+    //  background-repeat: no-repeat;
+    //  opacity: @shadow-opacity*0.25;
+    //}
   }
 
   #main, #fluidbook {