From 42dea3be3d778ecb265c462d69eed522c9703c08 Mon Sep 17 00:00:00 2001 From: Protected Date: Sat, 31 May 2025 04:52:04 +0100 Subject: [PATCH] Fix for fixed-layout transform anchor point in RTL context. (#68) If the viewer is running in an RTL context (this is not the same as the reading direction of the Book itself), and a fixed-layout rendered view is scaled (which is often the case), anchoring the transform to the left breaks page positioning. --- fixed-layout.js | 1 + 1 file changed, 1 insertion(+) diff --git a/fixed-layout.js b/fixed-layout.js index e742914..7ea1cb6 100644 --- a/fixed-layout.js +++ b/fixed-layout.js @@ -73,6 +73,7 @@ export class FixedLayout extends HTMLElement { const src = srcOptionIsString ? srcOption : srcOption?.src const onZoom = srcOptionIsString ? null : srcOption?.onZoom const element = document.createElement('div') + element.setAttribute("dir", "ltr") const iframe = document.createElement('iframe') element.append(iframe) Object.assign(iframe.style, {