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 15825fbe53
This commit is contained in:
schroda
2024-02-21 02:32:16 +01:00
committed by GitHub
parent d8ee676d55
commit 9531825bab

View File

@@ -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',
};