diff --git a/fpjs/reader/app.js b/fpjs/reader/app.js index 93e8527..cbf0ecd 100644 --- a/fpjs/reader/app.js +++ b/fpjs/reader/app.js @@ -4,7 +4,9 @@ FP.app.init = (function($){ var Book; - function init(){ + function init(){ + FP.core.crossBrowserColumnCss(); + Book = new FP.Book("area", "/moby-dick/"); //Book = new FP.Book("area", "/the-hound-of-the-baskervilles/"); @@ -15,7 +17,7 @@ FP.app.init = (function($){ setTimeout(function(){ meta(); toc(); - }, 100); + }, 500); setTimeout(function(){ toc(); }, 1000); diff --git a/fpjs/render/book.js b/fpjs/render/book.js index dc5ffe1..6951fe3 100644 --- a/fpjs/render/book.js +++ b/fpjs/render/book.js @@ -267,6 +267,12 @@ FP.Book.prototype.formatSpread = function(end){ this.gap = this.gap || this.elWidth / 8; this.colWidth = Math.ceil((this.elWidth - this.gap) / 2); + + //-- Must be even for firefox + if(this.colWidth % 2 != 0){ + this.colWidth -= 1; + } + this.spreadWidth = (this.colWidth + this.gap) * 2; //-- Clear Margins @@ -282,7 +288,7 @@ FP.Book.prototype.formatSpread = function(end){ this.bodyEl.style[FP.core.columnAxis] = "horizontal"; this.bodyEl.style[FP.core.columnGap] = this.gap+"px"; this.bodyEl.style[FP.core.columnWidth] = this.colWidth+"px"; - + this.calcPages(); if(end){ @@ -341,7 +347,6 @@ FP.Book.prototype.chapterEnd = function(){ } FP.Book.prototype.getTOC = function(){ - console.log(this.toc) return this.toc; } diff --git a/fpjs/render/core.js b/fpjs/render/core.js index 69a96df..21ac923 100644 --- a/fpjs/render/core.js +++ b/fpjs/render/core.js @@ -58,9 +58,8 @@ FP.core.crossBrowserColumnCss = function(){ FP.core.columnWidth = Modernizr.prefixed('columnWidth') || 'columnWidth'; // we are interested in the css prefixed version - FP.core.columnAxis = cssIfy(FP.core.columnAxis); - FP.core.columnGap = cssIfy(FP.core.columnGap); - FP.core.columnWidth = cssIfy(FP.core.columnWidth); + // FP.core.columnAxis = cssIfy(FP.core.columnAxis); + // FP.core.columnGap = cssIfy(FP.core.columnGap); + // FP.core.columnWidth = cssIfy(FP.core.columnWidth); + } - -FP.core.crossBrowserColumnCss();