From a41e4b897c8216de72b402e2e52d241d02704323 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sun, 14 May 2023 13:43:31 +0800 Subject: [PATCH] Fix header/footer direction --- paginator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paginator.js b/paginator.js index 745c1df..943b4ad 100644 --- a/paginator.js +++ b/paginator.js @@ -351,6 +351,7 @@ export class Paginator { maxColumnWidth: 700, } constructor({ book, onLoad, onRelocated, createOverlayer }) { + this.bookDir = book.dir this.sections = book.sections this.onLoad = onLoad this.onRelocated = onRelocated @@ -492,6 +493,7 @@ export class Paginator { height: `${margin}px`, gridTemplateColumns: `repeat(${marginalDivisor}, 1fr)`, gap: `${gap}px`, + direction: this.bookDir === 'rtl' ? 'rtl' : 'ltr', } Object.assign(this.#header.style, marginalStyle, { top: 0 }) Object.assign(this.#footer.style, marginalStyle, { bottom: 0 })