return this.fluidbook.mobilefirst.enabled || (this.orientation === 'portrait' && (this.fluidbook.support.iOS || this.fluidbook.support.android));
},
+ reduceVerticalMargins: function () {
+ return this.fluidbook.settings.mobileReducedMargins && this.orientation === 'portrait' && this.fluidbook.nav.burgerActive();
+ },
+
setMargins: function () {
var marginV = 20;
var marginY = marginV;
this.margintop = marginY + parseInt(this.fluidbook.settings.extraYSpace);
this.marginbottom = marginY + marginV;
this.marginright = this.marginleft;
+
+ if (this.reduceVerticalMargins()) {
+ this.margintop -= parseInt(this.fluidbook.settings.extraYSpace)
+ this.margintop -= 65;
+ this.marginbottom -= 30;
+ }
},
init: function () {
var cssHeaderScale = [headerScale, headerScale];
$("#main,#z,#scroll").css({
- width: this.ww,
- height: this.hh
+ width: this.ww, height: this.hh
});
this.resizeView();
// var pageNumberScale = Math.min(1, 1 / (this.bookScale / 0.5));
// $("#pagesnumbers").css('font-size', $("#pagesnumbers").data('size') * pageNumberScale);
$("#pagesnumbers").css({
- 'transform': 'scale(' + (this.bookScale) + ')',
- top: this.fh
+ 'transform': 'scale(' + (this.bookScale) + ')', top: this.fh
});
if (this.fluidbook._boolean(this.fluidbook.settings.logoHideWhenOverriden)) {
// Position audio buttons relative to book size and position
var audioButtonPosition = Math.max(this.hh / 6, 30 * interfaceScale); // Ensure at least 30px clearance at the bottom
$(".audio-description-button").css({
- scale: cssInterfaceScale,
- bottom: audioButtonPosition
+ scale: cssInterfaceScale, bottom: audioButtonPosition
});
$("#logo,footer,#searchHints").transform({
var headerHeight = this.fluidbook.settings.menuHeight * navScale;
$('header').css({
- height: headerHeight,
- backgroundSize: '100% ' + headerHeight + 'px'
+ height: headerHeight, backgroundSize: '100% ' + headerHeight + 'px'
});
this.refw = this.fw;
resizeEdges: function () {
$("#edges").css({
- transform: 'scale(' + this.bookScale + ')',
- transformOrigin: '0 0'
+ transform: 'scale(' + this.bookScale + ')', transformOrigin: '0 0'
});
},
resizeShadow: function () {
$("#shadow").transform({
- scale: [this.bookScale, this.bookScale],
- origin: this.origin,
+ scale: [this.bookScale, this.bookScale], origin: this.origin,
}).css({
- width: this.fww,
- left: this._left(this.fww),
- top: this._top(this.fhh),
+ width: this.fww, left: this._left(this.fww), top: this._top(this.fhh),
});
},
return;
}
$("#splash").css({
- width: this.ww,
- height: this.hh
+ width: this.ww, height: this.hh
});
if ($("#splash").css('opacity') == 0) {
var lh = $("#splash .logo").height();
$("#splash .logo").css({
- top: (this.hh / 2) - 30 - lh - 10,
- left: Math.max((this.ww - lw) / 2, 0) // Prevent negative left offsets
+ 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;
}, 2000);
}
}
- },
- getScreenFluidbookWidth: function () {
+ }, getScreenFluidbookWidth: function () {
return $("#fluidbook").outerWidth();
},