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.
This commit is contained in:
Protected
2025-05-31 03:52:04 +00:00
committed by GitHub
parent ed6400ddcb
commit 42dea3be3d
+1
View File
@@ -73,6 +73,7 @@ export class FixedLayout extends HTMLElement {
const src = srcOptionIsString ? srcOption : srcOption?.src const src = srcOptionIsString ? srcOption : srcOption?.src
const onZoom = srcOptionIsString ? null : srcOption?.onZoom const onZoom = srcOptionIsString ? null : srcOption?.onZoom
const element = document.createElement('div') const element = document.createElement('div')
element.setAttribute("dir", "ltr")
const iframe = document.createElement('iframe') const iframe = document.createElement('iframe')
element.append(iframe) element.append(iframe)
Object.assign(iframe.style, { Object.assign(iframe.style, {