Zoom evenly at a sensible rate
This commit is contained in:
parent
8ed3a93fbb
commit
62aa9edc14
@ -186,7 +186,7 @@
|
||||
let zoom = 3;
|
||||
viewer.addEventListener("wheel", (evt) => {
|
||||
console.log(evt.deltaY);
|
||||
zoom = Math.max(zoom + evt.deltaY * 0.75, minZoom);
|
||||
zoom = Math.max(zoom * (1 - evt.deltaY * 0.005), minZoom);
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user