FluidbookResize.prototype = {
reduceHorizontalMargins: function () {
- return this.fluidbook.mobilefirst.enabled || (this.orientation === 'portrait' && (this.fluidbook.support.iOS || this.fluidbook.support.android));
+ return this.fluidbook.mobilefirst.enabled || (this.orientation === 'portrait' && this.fluidbook.nav.burgerActive());
},
reduceVerticalMargins: function () {
var marginX = 60;
if (this.reduceHorizontalMargins()) {
- marginX = 20;
+ marginX = this.fluidbook.settings.mobileHorizontalMargins * 2;
}
this.marginleft = marginX + parseInt(this.fluidbook.settings.extraXSpace);
if (this.reduceVerticalMargins()) {
this.margintop -= parseInt(this.fluidbook.settings.extraYSpace)
this.margintop -= 65;
+ this.margintop = Math.max(0, this.margintop);
this.marginbottom -= 30;
}
},
}
this.marginTop = (parseInt(this.fluidbook.settings.menuHeight) * headerScale) + (this.margintop * interfaceScale);
- this.marginBottom = (10 + this.marginbottom) * interfaceScale;
+ if (this.fluidbook.settings.mobileHideSliderIfOverlaps) {
+ this.marginBottom = 0;
+ } else {
+ this.marginBottom = (10 + this.marginbottom) * interfaceScale;
+ }
this.marginLeft = (this.marginleft + parseInt(extraX)) * interfaceScale;
this.marginRight = (this.marginright + parseInt(extraX)) * interfaceScale;
}
}
this.checkLogoVisibility();
+ this.checkSliderVisibility();
$(window).scrollTop(0);
var data = {
}
},
+ checkSliderVisibility: function () {
+ if (this.fluidbook.settings.mobileHideSliderIfOverlaps && ($("#slider").get(0).getBoundingClientRect().top - $("#fluidbook").get(0).getBoundingClientRect().bottom < 5)) {
+ $('body').addClass('slider-hidden');
+ } else {
+ $('body').removeClass('slider-hidden');
+ }
+ },
+
checkLogoVisibility: function () {
if (this.fluidbook.mobilefirst.enabled || !this.fluidbook.settings.logoHideWhenOverriden) {
return;