mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
* Fix moveTo for vertical writing mode.
This commit is contained in:
parent
a1e77b745b
commit
b7bb95d97a
1 changed files with 6 additions and 0 deletions
|
@ -343,6 +343,12 @@ class DefaultViewManager {
|
|||
if (distX + this.layout.delta > this.container.scrollWidth) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
this.scrollTo(distX, distY, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue