mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 10:06:58 +00:00
round the calculated zoom level
This commit is contained in:
1 parent
b0b1f7fd0b
commit
6bb5d04f07
1 file changed
+1
-1
@@ -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