Skip to content

Commit

Permalink
Fix viewport in ReflowableSetup (readium#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayPanoz authored Sep 19, 2024
1 parent aa42023 commit e45ef07
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class ReflowableSetup extends Setup {
onViewportWidthChanged(event: Event) {
const wnd = event.target as Window;
// const pageWidth = wnd.innerWidth / wnd.devicePixelRatio;
setProperty(wnd, "--RS__viewportWidth", `calc(${wnd.innerWidth}px / ${wnd.devicePixelRatio})`);
setProperty(wnd, "--RS__viewportWidth", `${wnd.innerWidth}px`);
}

mount(wnd: Window, comms: Comms): boolean {
Expand Down

0 comments on commit e45ef07

Please sign in to comment.