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

Fixes for page counting

This commit is contained in:
Fred Chasen 2017-08-09 17:19:02 -04:00
parent 8bfed1593c
commit 03e7ca085c
5 changed files with 28 additions and 24 deletions

View file

@ -105,6 +105,7 @@ class Layout {
var colWidth;
var spreadWidth;
var pageWidth;
var delta;
if (this._spread && width >= this._minSpreadWidth) {
@ -135,14 +136,15 @@ class Layout {
width = colWidth;
}
spreadWidth = colWidth * divisor;
spreadWidth = (colWidth * divisor) + gap;
pageWidth = colWidth + (gap / 2);
delta = width;
// console.log(delta, width);
this.width = width;
this.height = _height;
this.spreadWidth = spreadWidth;
this.pageWidth = pageWidth;
this.delta = delta;
this.columnWidth = colWidth;
@ -152,6 +154,7 @@ class Layout {
this.props.width = width;
this.props.height = _height;
this.props.spreadWidth = spreadWidth;
this.props.pageWidth = pageWidth;
this.props.delta = delta;
this.props.columnWidth = colWidth;