this.marginleft = marginX + parseInt(this.fluidbook.datas.extraXSpace);
this.margintop = marginY + parseInt(this.fluidbook.datas.extraYSpace);
this.marginbottom = marginY + marginV;
- this.marginright = marginX + parseInt(this.fluidbook.datas.extraXSpace);
+ this.marginright = this.marginleft;
},
init: function () {
this.bookScale = this.fluidbook.mobilefirst.getBookScale(aw);
origin[1] = '0%';
}
-
- this.bookScale *= this.fluidbook.tabs.guessBookScale(this.bookScale, aw, fww);
+
+ var tabsScale = this.fluidbook.tabs.guessBookScale(this.bookScale, aw, fww);
+ console.log('tabsScale', tabsScale);
+ this.bookScale *= tabsScale;
var fw = this.bookScale * fww;
var fh = this.bookScale * fhh;
guessTabsWidth: function (bookScale) {
var fh = this.fluidbook.datas.height * bookScale;
var tabsScale = fh / this.naturalDimensions.height;
+
return this.linkWidth * tabsScale;
},
var $this = this;
var commoncss = {};
- var widthPct = (100 * (this.linkWidth / this.naturalDimensions.width)) + "%";
- commoncss.width = widthPct;
+ commoncss.width = (100 * (this.linkWidth / this.naturalDimensions.width)) + "%";
+ commoncss.left = (-100 * (this.margin / this.naturalDimensions.width)) + "%";
+ console.log(commoncss);
$(this.links).each(function (k, v) {
var l = $('<a class="tablink" />');
$this.cont.append(l);
l.css(commoncss);
l.css(v.css);
+
if (v.page) {
l.attr('href', '#/page/' + v.page);
}