Skip to content

Commit

Permalink
https://github.com/futurepress/epub.js/pull/1277
Browse files Browse the repository at this point in the history
  • Loading branch information
pastak committed Mar 16, 2023
1 parent 8b49fef commit 454c8d2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/managers/default/index.js
Expand Up @@ -350,10 +350,9 @@ class DefaultViewManager {
distX = this.container.scrollWidth - this.layout.delta;
}

distY = Math.floor(offset.top / this.layout.delta) * this.layout.delta;

if (distY + this.layout.delta > this.container.scrollHeight) {
distY = this.container.scrollHeight - this.layout.delta;
distY = Math.floor(offset.top / this.layout.height) * this.layout.height;
if (distY + this.layout.height > this.container.scrollHeight) {
distY = this.container.scrollHeight - this.layout.height;
}
}
if(this.settings.direction === "rtl"){
Expand Down

0 comments on commit 454c8d2

Please sign in to comment.