From 0a8c5f43d7e15423aa2414dfc5bbe798b629d42e Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Sat, 14 Dec 2024 23:00:40 +0000 Subject: [PATCH] fix: make minimum zoom 10% from 25% --- src/components/Canvas.tsx | 2 +- src/components/information/Canvas.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Canvas.tsx b/src/components/Canvas.tsx index 8b5520c..7af64c7 100644 --- a/src/components/Canvas.tsx +++ b/src/components/Canvas.tsx @@ -125,7 +125,7 @@ function Canvas() { e.preventDefault(); const scaleChange = e.deltaY > 0 ? -0.1 : 0.1; - const newScale = Math.min(Math.max(scale + scaleChange * scale, 0.25), 32); + const newScale = Math.min(Math.max(scale + scaleChange * scale, 0.1), 32); setScale(newScale); setCoords({ diff --git a/src/components/information/Canvas.tsx b/src/components/information/Canvas.tsx index 252925a..14d76a5 100644 --- a/src/components/information/Canvas.tsx +++ b/src/components/information/Canvas.tsx @@ -37,7 +37,7 @@ function CanvasInformation({ scale, setScale, setCoords, canvasSize, stageSize }