Fix double page with different dimensions

In case two pages were displayed with different dimensions, the bigger page might take up more than 50% of the screen.
In this case the bigger page got limited to 50% which caused in to unintentionally get reduced in size
This commit is contained in:
schroda
2024-12-16 21:13:07 +01:00
parent 942d8699c1
commit 15a70760ca
4 changed files with 29 additions and 15 deletions

View File

@@ -11,8 +11,6 @@ import { ReactNode, useEffect, useMemo, useRef } from 'react';
import { ReaderService } from '@/modules/reader/services/ReaderService.ts';
import { getImageWidthStyling, getPageIndexesToLoad } from '@/modules/reader/utils/ReaderPager.utils.tsx';
import { ReaderStatePages } from '@/modules/reader/types/ReaderProgressBar.types.ts';
import { applyStyles } from '@/modules/core/utils/ApplyStyles.ts';
import { isContinuousReadingMode, isReaderWidthEditable } from '@/modules/reader/utils/ReaderSettings.utils.tsx';
import { ReaderPagerProps, ReaderTransitionPageMode } from '@/modules/reader/types/Reader.types.ts';
import { ReaderTransitionPage } from '@/modules/reader/components/viewer/ReaderTransitionPage.tsx';
@@ -57,14 +55,6 @@ export const BasePager = ({
false,
readerWidth.value,
),
applyStyles(!!readerWidth?.value.enabled && isReaderWidthEditable(pageScaleMode.value), {
alignItems: 'center',
// both continuous pagers have content that causes scrollbars, centering this content causes content
// to be cut off
...applyStyles(!isContinuousReadingMode(readingMode.value), {
justifyContent: 'center',
}),
}),
]}
>
<ReaderTransitionPage