1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00
This commit is contained in:
momochi29 2023-05-17 11:24:02 -07:00 committed by GitHub
commit a916ec7a33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'){