]> _ Git - fluidbook-html5.git/commitdiff
wip #4710 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 Sep 2021 16:49:36 +0000 (18:49 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 Sep 2021 16:49:36 +0000 (18:49 +0200)
js/libs/fluidbook/fluidbook.resize.js
js/libs/fluidbook/fluidbook.support.js
style/fluidbook.less

index f16301fe1fb3c7f438d60efc3939ac42649942e5..5bbc02cbbff86e8566a536fc0b7499e99ab26dc8 100644 (file)
@@ -192,47 +192,19 @@ FluidbookResize.prototype = {
             this.origin[1] = '0%';
         }
 
-        try {
-            this.fluidbook.loader.renderTextsCanvas();
-        } catch (e) {
-
-        }
-
         var tabsScale = this.fluidbook.tabs.guessBookScale(this.bookScale, this.aw, this.fww);
         this.bookScale *= tabsScale;
 
-
-        this.resizeBook();
-
         this.fw = this.bookScale * this.fww;
         this.fh = this.bookScale * this.fhh;
 
-        console.log(this.fw, this.fh);
-
-        // $("#fluidbook,#shadow").transform({
-        //     scale: [this.bookScale, this.bookScale],
-        //     origin: origin
-        // });
+        this.resizeBook();
 
         // Hack to fix #2552
         if (this.fluidbook.support.iOS && this.fluidbook.pagetransitions.getTransitionType() === 'flip3d') {
             // $('#fluidbook').css('transform', 'translate3d(0,0,-1px) scale(' + this.bookScale + ',' + this.bookScale + ')');
         }
 
-        // var top = marginTop + (ah - fhh) / 2;
-        //
-        // var left = marginLeft + (aw - fww) / 2;
-        // if (this.fluidbook.mobilefirst.enabled) {
-        //     top = marginTop;
-        // }
-        // $("#fluidbook,#shadow").css({
-        //     top: top,
-        //     left: left,
-        //     width: fww,
-        //     height: fhh
-        // });
-
-
         if (this.fluidbook.mobilefirst.enabled) {
             this.fluidbook.mobilefirst.resize();
         }
@@ -377,6 +349,7 @@ FluidbookResize.prototype = {
         $(p).find('.doublePage').css(css);
 
         this.resizeLinks();
+        this.fluidbook.loader.renderTextsCanvas();
     },
 
     resizeLinks: function () {
@@ -409,7 +382,7 @@ FluidbookResize.prototype = {
             scale: [this.bookScale, this.bookScale],
             origin: this.origin,
         }).css({
-            left: this._left(this.fww + (24 * this.bookScale)),
+            left: this._left(this.fww),
             top: this._top(this.fhh),
         });
     },
@@ -553,7 +526,7 @@ FluidbookResize.prototype = {
         }
     },
     getScreenFluidbookWidth: function () {
-        return $("#fluidbook").outerWidth() * fluidbook.resize.bookScale;
+        return $("#fluidbook").outerWidth();
     },
 
     resizeHorizontalNav: function () {
index 9fbf5292502796a204cc85dce0b54eb8766cb72a..639a1d2dcc31756ec96a9e107bed75d53a7978f0 100644 (file)
@@ -128,7 +128,6 @@ FluidbookSupport.prototype = {
         return t;
     },
     initEvents: function () {
-
         var $this = this;
 
         if (!isMobile(false)) {
index 381a8d522d606714bcdfeac18d8ba01d769796cf..95a638f0b8aa943b1dd447788724125409e1ecaf 100644 (file)
@@ -370,7 +370,7 @@ body, html {
   background-color: @pages-background;
 
   img {
-    width: 100%;
+    width: ~"calc(100% + 1px)";
     height: 100%;
   }
 }
@@ -651,7 +651,7 @@ body, html {
   position: absolute;
   top: 0px;
   left: 0px;
-  width: unit(@shadow-width-left+@shadow-width-right, px);
+  width: unit(@book-page-width*2, px);
   height: unit(@book-page-height, px);
   pointer-events: none;
   mix-blend-mode: multiply;