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:
parent
2e5797a24f
commit
6dc9088fb7
11 changed files with 167 additions and 71 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue