fix: make zooming consistent at all scale levels
This commit is contained in:
parent
2c960ebd84
commit
2670fbb1e8
1 changed files with 1 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ function App() {
|
||||||
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, 0.25), 16);
|
const newScale = Math.min(Math.max(scale + (scaleChange * scale), 0.25), 32);
|
||||||
|
|
||||||
setScale(newScale);
|
setScale(newScale);
|
||||||
setCoords({
|
setCoords({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue