From 4c71987866ee26868c7454149c1ee7504cef1abe Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 22 Aug 2024 15:54:58 -0500 Subject: [PATCH] change the toFit method to toFill Realized this method is filling the preview pane, and that toFit would force the zoom to show the entirety of a single page at once. --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 8276f366f..c0e5ca469 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -42,7 +42,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ }; - const toFit = ()=>{ + const toFill = ()=>{ const iframe = document.getElementById('BrewRenderer'); const iframeWidth = iframe.getBoundingClientRect().width; const pages = iframe.contentWindow.document.getElementsByClassName('page'); @@ -55,7 +55,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ widestPage = width; }); - const margin = 5; // extra space so page isn't edge to edge (not truly "to fit") + const margin = 5; // extra space so page isn't edge to edge (not truly "to fill") const desiredZoom = (iframeWidth / widestPage) * 100; const deltaZoom = (desiredZoom - zoomLevel) - margin; return deltaZoom; @@ -65,11 +65,11 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{