From: Vincent Vanwaelscappel Date: Thu, 29 Feb 2024 10:23:58 +0000 (+0100) Subject: wait #6756 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f8d8ba0cd000aa40dd6761805255b1376f128b72;p=fluidbook-html5.git wait #6756 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 55bf9ffa..c82cb4b1 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -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(); }, diff --git a/style/fluidbook.less b/style/fluidbook.less index 261eec70..236e25cd 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -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; }