]> _ Git - fluidbook-html5.git/commitdiff
wip #2657 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 Apr 2019 13:23:58 +0000 (15:23 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 Apr 2019 13:23:58 +0000 (15:23 +0200)
js/libs/fluidbook/fluidbook.loader.js
js/libs/fluidbook/fluidbook.mobilefirst.js
style/fluidbook.less

index f643ff973066d0df5052f2cb03f6d56f6b616474..1f8686d11d75fc23f22b0fc0bca55138d1617f4a 100644 (file)
@@ -21,6 +21,11 @@ FluidbookLoader.prototype = {
         this.shadeRight = this.loadImage('images/shadows/pages/right.png');
     },
 
+    getPageDimensions: function (page) {
+        var dim = this.fluidbook.datas.pagesDimensions[page];
+        return {width: dim[0], height: dim[1]};
+    },
+
     getVersionToLoad: function (page) {
         if (this.fluidbook.vectorTexts) {
             if (this.fluidbook.datas.vectorPages.indexOf(page) >= 0) {
index cf42df4b5af9c064b7ae7fae2507e35f17b7ded3..041f2efc0b717cca5ef388e2dab24080d2891551 100644 (file)
@@ -15,6 +15,12 @@ FluidbookMobileFirst.prototype = {
     },
 
     beforeTransition: function (page) {
+        var dimensions = this.fluidbook.loader.getPageDimensions(page);
+        $("#nextDoublePage .page, #nextDoublePage").css({
+            height: dimensions.height,
+            maxHeight: dimensions.height
+        });
+
         TweenLite.to("#scroll", this.fluidbook.pagetransitions.getTransitionDuration(page), {scrollTo: 0});
     },
 
@@ -22,13 +28,18 @@ FluidbookMobileFirst.prototype = {
         $('#pages .mf-nav').remove();
         $("#pages").append(this.getFooterNavigation(page));
         this.fluidbook.resize.resize();
+        var $this=this;
+        setTimeout(function(){
+            this.fluidbook.resize.resize();
+        },1000);
     },
 
     resize: function () {
-        var h = $(".doublePage").outerHeight();
-        $('#pages .mf-nav').css('top', h);
-        h += $("#pages .mf-nav").outerHeight();
+        var bh = $("#currentDoublePage").outerHeight();
+        $('#pages .mf-nav').css('top', bh);
+        var h = bh+$("#pages .mf-nav").outerHeight();
 
+        $("#links,#searchHighlights").css({height:bh});
         $("#pages,#fluidbook").css({height: h});
         $("#pages").css('maxHeight', h);
     },
index 38c4be0da7b0efb839a565b67a2686b0047da5b4..4d640f2ac11d90e0ad408a523cc2ced8cac77254 100644 (file)
@@ -304,10 +304,18 @@ body, html {
   img {
     width: unit(@book-page-correct-width, px);
     height: unit(@book-page-correct-height, px);
+
+    .mobilefirst & {
+      height: 100%;
+    }
   }
 }
 
 .texts {
+  .mobilefirst & {
+    height: 100%;
+  }
+
   img, object {
     position: absolute;
     top: 0px;