From d244ba65381e68206229dcacc1e20b7c9409ae5a Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Tue, 13 Feb 2024 01:53:18 +0100 Subject: [PATCH] Fit double page reader pages correctly to windows width (#595) The max-width, which is for a single page, was applied to each page of the double page reader, which resulted in both of them being able to take up 100% of the available width --- src/components/reader/DoublePage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/reader/DoublePage.tsx b/src/components/reader/DoublePage.tsx index cdbc60e7..ee321fe2 100644 --- a/src/components/reader/DoublePage.tsx +++ b/src/components/reader/DoublePage.tsx @@ -28,6 +28,7 @@ export const DoublePage = forwardRef((props: IProps, ref: any) => { const imgStyle = { ...baseImgStyle, width: settings.fitPageToWindow ? baseImgStyle.width : `calc(${baseImgStyle.width} * 0.5)`, + maxWidth: settings.fitPageToWindow ? `calc(${baseImgStyle.maxWidth} * 0.5)` : baseImgStyle.maxWidth, }; const spinnerStyle: SxProps = {