mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Add offset to start calculation
This commit is contained in:
parent
5c04784ab8
commit
992a3f7461
1 changed files with 1 additions and 9 deletions
|
@ -645,19 +645,11 @@ class DefaultViewManager {
|
|||
let width = view.width();
|
||||
|
||||
// Find mapping
|
||||
let start = left + container.left - position + used;
|
||||
let start = left + container.left - position + offset + used;
|
||||
let end = start + this.layout.width - used;
|
||||
|
||||
let mapping = this.mapping.page(view.contents, view.section.cfiBase, start, end);
|
||||
|
||||
// Find displayed pages
|
||||
//console.log("pre", end, offset + width);
|
||||
// if (end > offset + width) {
|
||||
// end = offset + width;
|
||||
// used = this.layout.pageWidth;
|
||||
// }
|
||||
// console.log("post", end);
|
||||
|
||||
let totalPages = this.layout.count(width).pages;
|
||||
let startPage = Math.floor(start / this.layout.pageWidth);
|
||||
let pages = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue