]> _ Git - fluidbook-html5.git/commitdiff
wait #6756 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Feb 2024 10:23:58 +0000 (11:23 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Feb 2024 10:23:58 +0000 (11:23 +0100)
js/libs/fluidbook/fluidbook.resize.js
style/fluidbook.less

index 55bf9ffa776e06f54f7cd63d371ae6ad6e8518a2..c82cb4b1cc231e7fb495bd3c4bdf145ddd173fa0 100644 (file)
@@ -63,6 +63,10 @@ FluidbookResize.prototype = {
 
     init: function () {
 
+        if(this.fluidbook.settings.fixAirPixel && this.fluidbook.settings.mobileNavigationType === 'portrait'){
+            $('body').addClass('fixairpixel');
+        }
+
         // Manage transform origins based on text direction
         // This is important for the elements to have the correct position after scaling
         // Note: the #logo is handled in the CSS because it is also affected by the .menu-inverted class
@@ -468,17 +472,23 @@ FluidbookResize.prototype = {
         $("#splash .logo").css({
             top: (this.hh / 2) - 30 - lh - 10, left: Math.max((this.ww - lw) / 2, 0) // Prevent negative left offsets
         });
-    }, updateWindow: function () {
+    },
+
+    updateWindow: function () {
         this.ww = $(window).width();
         this.hh = $(window).height();
         if (window.innerHeight && window.innerHeight != this.hh) {
             this.hh = window.innerHeight;
         }
-    }, resizeView: function () {
+    },
+
+    resizeView: function () {
         var $this = this;
         this.updateWindow();
         this.fluidbook.menu.resize(this.ww, this.hh);
-    }, handleOrientation: function (forceChange) {
+    },
+
+    handleOrientation: function (forceChange) {
         var $this = this;
         if (forceChange === undefined) {
             forceChange = false;
@@ -509,6 +519,7 @@ FluidbookResize.prototype = {
         this.orientation = newo;
 
         $('body').addClass(this.orientation);
+
         this.fluidbook.displayOnePage = this.fluidbook.alwaysDisplayOnePage || (this.orientation === 'portrait');
 
         if (changeOrientation) {
@@ -527,7 +538,9 @@ FluidbookResize.prototype = {
                 }, 2000);
             }
         }
-    }, getScreenFluidbookWidth: function () {
+    },
+
+    getScreenFluidbookWidth: function () {
         return $("#fluidbook").outerWidth();
     },
 
index 261eec7035a52563e83d2e80a60ede05df6478c0..236e25cde55d571bc9ed9917399f254909697226 100644 (file)
@@ -396,13 +396,22 @@ body, html {
   height: 100%;
   background-color: @pages-background;
 
+  .fixairpixel & {
+    overflow: hidden;
+  }
+
   img {
-    //width: ~"calc(100% + 1px)";
     width: 100%;
     height: 100%;
+
+    .fixairpixel & {
+      width: ~"calc(100% + 1px)";
+      height: ~"calc(100% + 1px)";
+    }
   }
 }
 
+
 .chrome .nozoom .background img {
   image-rendering: -webkit-optimize-contrast;
 }