Skip to content

Commit

Permalink
Merge pull request #1051 from futurepress/980_add_offset_to_pre_pagin…
Browse files Browse the repository at this point in the history
…ated

Add offset to start calculation
  • Loading branch information
fchasen committed May 15, 2020
2 parents 5c04784 + 992a3f7 commit 7e604ca
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/managers/default/index.js
Expand Up @@ -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 = [];
Expand Down

0 comments on commit 7e604ca

Please sign in to comment.