Skip to content

Commit 9531825

Browse files
authored
Fix size of pages in continues reader mode (#613)
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
1 parent d8ee676 commit 9531825

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/reader/Page.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ export function imageStyle(settings: IReaderSettings): any {
2424
marginRight: isHorizontal ? '7px' : 0,
2525
marginBottom: settings.readerType === 'ContinuesVertical' ? '15px' : 0,
2626
width: 'auto',
27-
maxWidth: settings.fitPageToWindow ? 'calc(100vw - (100vw - 100%))' : undefined,
27+
maxWidth: settings.fitPageToWindow && !isHorizontal ? 'calc(100vw - (100vw - 100%))' : undefined,
2828
height: 'auto',
29+
minHeight: isHorizontal ? '100vh' : undefined,
2930
maxHeight: '100vh',
3031
objectFit: 'contain',
3132
};

0 commit comments

Comments
 (0)