Skip to content

Commit

Permalink
Fix size of pages in continues reader mode (#613)
Browse files Browse the repository at this point in the history
In case "fit to page" was enabled, the styling got incorrectly applied to horizontal pages. Causing the pages to be small

Regression introduced with 15825fb
  • Loading branch information
schroda authored Feb 21, 2024
1 parent d8ee676 commit 9531825
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/reader/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export function imageStyle(settings: IReaderSettings): any {
marginRight: isHorizontal ? '7px' : 0,
marginBottom: settings.readerType === 'ContinuesVertical' ? '15px' : 0,
width: 'auto',
maxWidth: settings.fitPageToWindow ? 'calc(100vw - (100vw - 100%))' : undefined,
maxWidth: settings.fitPageToWindow && !isHorizontal ? 'calc(100vw - (100vw - 100%))' : undefined,
height: 'auto',
minHeight: isHorizontal ? '100vh' : undefined,
maxHeight: '100vh',
objectFit: 'contain',
};
Expand Down

0 comments on commit 9531825

Please sign in to comment.