mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-25 01:02:47 +00:00
round the calculated zoom level
This commit is contained in:
@@ -22,7 +22,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{
|
||||
}, [currentPage]);
|
||||
|
||||
const handleZoomButton = (delta)=>{
|
||||
const newZoomLevel = _.clamp(zoomLevel + delta, MIN_ZOOM, MAX_ZOOM);
|
||||
const newZoomLevel = _.round(_.clamp(zoomLevel + delta, MIN_ZOOM, MAX_ZOOM));
|
||||
setZoomLevel(newZoomLevel);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user