mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: consistent use of ZOOM_STEP (#5801)
introduce MIN_ZOOM, consistent use of ZOOM_STEP
This commit is contained in:
parent
f5379d1563
commit
1e69609ce4
4 changed files with 7 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
|||
import { MIN_ZOOM } from "../constants";
|
||||
import { AppState, NormalizedZoomValue } from "../types";
|
||||
|
||||
export const getNormalizedZoom = (zoom: number): NormalizedZoomValue => {
|
||||
return Math.max(0.1, Math.min(zoom, 30)) as NormalizedZoomValue;
|
||||
return Math.max(MIN_ZOOM, Math.min(zoom, 30)) as NormalizedZoomValue;
|
||||
};
|
||||
|
||||
export const getStateForZoom = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue