$("#pages").css('maxHeight', h);
},
- getBookScale: function () {
- return Math.min(620, this.fluidbook.resize.ww * 0.9) / this.fluidbook.datas.width;
+ getBookScale: function (aw) {
+ return Math.min(620, aw) / this.fluidbook.datas.width;
},
getFooterNavigation: function (page) {
FluidbookResize.prototype = {
reduceHorizontalMargins: function () {
- return this.orientation === 'portrait' && (this.fluidbook.support.iOS || this.fluidbook.support.android);
+ return this.fluidbook.mobilefirst.enabled || (this.orientation === 'portrait' && (this.fluidbook.support.iOS || this.fluidbook.support.android));
},
setMargins: function () {
- var marginV = this.fluidbook.mobilefirst.enabled ? 36 : 20;
+ var marginV = 20;
var marginY = marginV;
var marginX = 60;
// 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
+ var ltr = this.fluidbook.l10n.dir === 'ltr';
- var left = this.fluidbook.l10n.dir == 'ltr' ? '0%' : '100%';
- var right = this.fluidbook.l10n.dir == 'ltr' ? '100%' : '0%';
+ var left = ltr ? '0%' : '100%';
+ var right = ltr ? '100%' : '0%';
$("#nav,#searchHints").transform({
origin: [left, '0%']
extraX = 0;
}
- marginTop = (parseInt(this.fluidbook.datas.menuHeight) + this.margintop) * interfaceScale;
+ marginTop = (parseInt(this.fluidbook.datas.menuHeight) * headerScale) + (this.margintop * interfaceScale);
marginBottom = (10 + this.marginbottom) * interfaceScale;
marginLeft = (this.marginleft + parseInt(extraX)) * interfaceScale;
marginRight = (this.marginright + parseInt(extraX)) * interfaceScale;
this.bookScale = Math.min(aw / fww, ah / fhh);
var origin = ['50%', '50%'];
if (this.fluidbook.mobilefirst.enabled) {
- this.bookScale = this.fluidbook.mobilefirst.getBookScale();
+ this.bookScale = this.fluidbook.mobilefirst.getBookScale(aw);
origin[1] = '0%';
}
},
checkLogoVisibility: function () {
- if(this.fluidbook.mobilefirst.enabled){
+ if (this.fluidbook.mobilefirst.enabled) {
return;
}
var logo = document.getElementById("logo").getBoundingClientRect();