1
0
Fork 0
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:
Meng-Yuan Huang 2020-09-06 21:31:09 +08:00
parent b7bb95d97a
commit c59226133c

View file

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