From c59226133c6c8b87ac755dba9c58e609c6168f9d Mon Sep 17 00:00:00 2001 From: Meng-Yuan Huang Date: Sun, 6 Sep 2020 21:31:09 +0800 Subject: [PATCH] * Fix a layout update bug after crossing a section boundary. --- src/managers/default/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/managers/default/index.js b/src/managers/default/index.js index dc80f7f..a1ee60d 100644 --- a/src/managers/default/index.js +++ b/src/managers/default/index.js @@ -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") {