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