mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
initial pagination features
This commit is contained in:
parent
73ac66ba65
commit
93a0cd772d
19 changed files with 970 additions and 104 deletions
|
@ -33,7 +33,6 @@ EPUBJS.Layout.Reflowable.prototype.format = function(documentElement, _width, _h
|
|||
documentElement.style[columnWidth] = width+"px";
|
||||
|
||||
documentElement.style.width = width + "px";
|
||||
|
||||
return {
|
||||
pageWidth : this.spreadWidth,
|
||||
pageHeight : _height
|
||||
|
@ -45,7 +44,7 @@ EPUBJS.Layout.Reflowable.prototype.calculatePages = function() {
|
|||
this.documentElement.style.width = "auto"; //-- reset width for calculations
|
||||
totalWidth = this.documentElement.scrollWidth;
|
||||
displayedPages = Math.round(totalWidth / this.spreadWidth);
|
||||
|
||||
// console.log(totalWidth, this.spreadWidth)
|
||||
return {
|
||||
displayedPages : displayedPages,
|
||||
pageCount : displayedPages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue