mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
* Fix a layout update bug after crossing a section boundary.
This commit is contained in:
parent
b7bb95d97a
commit
c59226133c
1 changed files with 4 additions and 0 deletions
|
@ -492,6 +492,8 @@ class DefaultViewManager {
|
|||
|
||||
if(next) {
|
||||
this.clear();
|
||||
// The new section may have a different writing-mode from the old section. Thus, we need to update layout.
|
||||
this.updateLayout();
|
||||
|
||||
let forceRight = false;
|
||||
if (this.layout.name === "pre-paginated" && this.layout.divisor === 2 && next.properties.includes("page-spread-right")) {
|
||||
|
@ -583,6 +585,8 @@ class DefaultViewManager {
|
|||
|
||||
if(prev) {
|
||||
this.clear();
|
||||
// The new section may have a different writing-mode from the old section. Thus, we need to update layout.
|
||||
this.updateLayout();
|
||||
|
||||
let forceRight = false;
|
||||
if (this.layout.name === "pre-paginated" && this.layout.divisor === 2 && typeof prev.prev() !== "object") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue