mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
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:
@@ -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, {
|
||||||
|
|||||||
Reference in New Issue
Block a user