From 49e072f03f349e5a4aac29b384caa5d50bdce54a Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Wed, 4 Sep 2024 13:54:55 -0500 Subject: [PATCH 01/14] Add button to toggle Preview tools Toggles a state variable to either visible or hidden which is used to set a related class on the toolbar. The hiding is done with CSS, just reducing the width of the toolbar and the opacity of the tools. --- .../homebrew/brewRenderer/toolBar/toolBar.jsx | 6 +++-- .../brewRenderer/toolBar/toolBar.less | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index fb3b62067..5c0a0c2ba 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -11,6 +11,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ const [zoomLevel, setZoomLevel] = useState(100); const [pageNum, setPageNum] = useState(currentPage); + const [toolsVisible, setToolsVisible] = useState(true); useEffect(()=>{ onZoomChange(zoomLevel); @@ -66,8 +67,9 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ return deltaZoom; }; - return ( -
+ return ( +
+ {/*v=====----------------------< Zoom Controls >---------------------=====v*/}
+ {/*v=====----------------------< Zoom Controls >---------------------=====v*/}