fix: make minimum zoom 10% from 25%
This commit is contained in:
parent
bebf8aaba4
commit
0a8c5f43d7
2 changed files with 2 additions and 2 deletions
|
|
@ -125,7 +125,7 @@ function Canvas() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const scaleChange = e.deltaY > 0 ? -0.1 : 0.1;
|
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);
|
setScale(newScale);
|
||||||
setCoords({
|
setCoords({
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ function CanvasInformation({ scale, setScale, setCoords, canvasSize, stageSize }
|
||||||
<div className="info-child">
|
<div className="info-child">
|
||||||
<Slider
|
<Slider
|
||||||
defaultValue={[1]}
|
defaultValue={[1]}
|
||||||
min={0.25}
|
min={0.1}
|
||||||
max={32}
|
max={32}
|
||||||
step={0.1}
|
step={0.1}
|
||||||
value={[scale]}
|
value={[scale]}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue