Fix "continuous vertical pager" unintentional page gaps
Depending on the screen size and e.g. the set "reader width" pages might not have filled out the full img elements size due to "object-fit contain". This was caused due to the image wrappers flex container "align-items center" which slightly reduced the images width to some ".xy" number (e.g. instead of wrappers width 258px, the images were something like 257.83px)
This commit is contained in:
@@ -95,6 +95,10 @@ export const getImagePlaceholderStyling = (
|
||||
...applyStyles(shouldStretchPage, {
|
||||
minWidth: minWidthForStretch,
|
||||
}),
|
||||
// the SpinnerImage placeholder has a default height of 100%, this caused the placeholder due take up 100% of the readers full scrollable height instead of only 100% of the viewport
|
||||
...applyStyles(isContinuousVerticalReadingMode(readingMode), {
|
||||
height: 'unset',
|
||||
}),
|
||||
};
|
||||
case ReaderPageScaleMode.HEIGHT:
|
||||
return {
|
||||
@@ -241,6 +245,7 @@ export const createReaderPage = (
|
||||
retryKeyPrefix?: string,
|
||||
position?: 'left' | 'right',
|
||||
isDoublePage?: boolean,
|
||||
marginTop?: number,
|
||||
setRef?: (ref: HTMLElement | null) => void,
|
||||
): ReactNode => (
|
||||
<ReaderPage
|
||||
@@ -256,6 +261,7 @@ export const createReaderPage = (
|
||||
doublePage={isDoublePage}
|
||||
shouldLoad={shouldLoad}
|
||||
retryKeyPrefix={retryKeyPrefix}
|
||||
marginTop={marginTop}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user