Fix margin of double pages with set reader width
Depending on the set reader width, the auto margin of the images took effect and separated the double pages. However, for double pages, only the margin left/right depending on the page should be set, to properly center the pages without a gap between them
This commit is contained in:
@@ -213,6 +213,7 @@ export const getImageWidthStyling = (
|
||||
export const getImageMarginStyling = (doublePage: boolean, objectFitPosition?: 'left' | 'right'): CSSObject => ({
|
||||
m: 'auto',
|
||||
...applyStyles(doublePage, {
|
||||
m: 'unset',
|
||||
// the applied margin is the opposite of the objectFitPosition
|
||||
...applyStyles(objectFitPosition === 'right', { ml: 'auto ' }),
|
||||
...applyStyles(objectFitPosition === 'left', { mr: 'auto ' }),
|
||||
|
||||
Reference in New Issue
Block a user