From 96642c07d3e840754b7822ee30de8465f12dabca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Mon, 21 Apr 2025 20:45:48 +0200 Subject: [PATCH] initial attempt at facing width button --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index f11d1f127..02a15c70c 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -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. 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'){ let minDimRatio;