mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 18:42:40 +00:00
initial attempt at facing width button
This commit is contained in:
@@ -55,7 +55,10 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa
|
|||||||
// find widest page, in case pages are different widths, so that the zoom is adapted to not cut the widest page off screen.
|
// find widest page, in case pages are different widths, so that the zoom is adapted to not cut the widest page off screen.
|
||||||
const widestPage = _.maxBy([...pages], 'offsetWidth').offsetWidth;
|
const widestPage = _.maxBy([...pages], 'offsetWidth').offsetWidth;
|
||||||
|
|
||||||
desiredZoom = (iframeWidth / widestPage) * 100;
|
if(displayOptions.spread === 'facing')
|
||||||
|
desiredZoom = (iframeWidth / widestPage) * 50;
|
||||||
|
else
|
||||||
|
desiredZoom = (iframeWidth / widestPage) * 100;
|
||||||
|
|
||||||
} else if(mode == 'fit'){
|
} else if(mode == 'fit'){
|
||||||
let minDimRatio;
|
let minDimRatio;
|
||||||
|
|||||||
Reference in New Issue
Block a user