1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

updated gap settings, resize

This commit is contained in:
fchasen 2014-05-04 09:31:47 -07:00
parent 2e5797a24f
commit 6dc9088fb7
11 changed files with 167 additions and 71 deletions

View file

@ -15,7 +15,7 @@ EPUBJS.Layout.Reflowable.prototype.format = function(documentElement, _width, _h
var width = Math.floor(_width);
// var width = (fullWidth % 2 === 0) ? fullWidth : fullWidth - 0; // Not needed for single
var section = Math.floor(width / 8);
var gap = _gap || (section % 2 === 0) ? section : section - 1;
var gap = (_gap >= 0) ? _gap : ((section % 2 === 0) ? section : section - 1);
this.documentElement = documentElement;
//-- Single Page
this.spreadWidth = (width + gap);
@ -72,7 +72,8 @@ EPUBJS.Layout.ReflowableSpreads.prototype.format = function(documentElement, _wi
var width = (fullWidth % 2 === 0) ? fullWidth : fullWidth - 1;
var section = Math.floor(width / 8);
var gap = _gap || (section % 2 === 0) ? section : section - 1;
var gap = (_gap >= 0) ? _gap : ((section % 2 === 0) ? section : section - 1);
//-- Double Page
var colWidth = Math.floor((width - gap) / divisor);