Resize images properly to set reader width
Images didn't shrink in size while the reader width was set and the original size was used
This commit is contained in:
@@ -151,6 +151,10 @@ export const getImageWidthStyling = (
|
||||
switch (pageScaleMode) {
|
||||
case ReaderPageScaleMode.WIDTH:
|
||||
return {
|
||||
minWidth: 0,
|
||||
...applyStyles(isContinuousReadingMode(readingMode), {
|
||||
minWidth: 'unset',
|
||||
}),
|
||||
...applyStyles(shouldStretchPage, {
|
||||
minWidth: width,
|
||||
...readerWidthStretchForWrapper,
|
||||
@@ -160,6 +164,10 @@ export const getImageWidthStyling = (
|
||||
};
|
||||
case ReaderPageScaleMode.HEIGHT:
|
||||
return {
|
||||
minHeight: 0,
|
||||
...applyStyles(isContinuousReadingMode(readingMode), {
|
||||
minHeight: 'unset',
|
||||
}),
|
||||
...applyStyles(shouldStretchPage, {
|
||||
minHeight: '100%',
|
||||
}),
|
||||
@@ -167,6 +175,12 @@ export const getImageWidthStyling = (
|
||||
};
|
||||
case ReaderPageScaleMode.SCREEN:
|
||||
return {
|
||||
minWidth: 0,
|
||||
minHeight: 0,
|
||||
...applyStyles(isContinuousReadingMode(readingMode), {
|
||||
minWidth: 'unset',
|
||||
minHeight: 'unset',
|
||||
}),
|
||||
...applyStyles(shouldStretchPage, {
|
||||
minWidth: width,
|
||||
minHeight: '100%',
|
||||
|
||||
Reference in New Issue
Block a user