Skip to content
Snippets Groups Projects
Commit bbedf241 authored by Jakob Yanagibashi's avatar Jakob Yanagibashi :nail_care_tone4:
Browse files

Reverse mouse wheel zoom

parent bd798eba
No related branches found
No related tags found
No related merge requests found
...@@ -490,13 +490,13 @@ function initIllo() { ...@@ -490,13 +490,13 @@ function initIllo() {
e.preventDefault(); e.preventDefault();
// Zoom into: positive, Zoom out: negative, e.deltaY // Zoom into: positive, Zoom out: negative, e.deltaY
if ( if (
(window.illo.scale.x < 2 && e.deltaY < 0) || (window.illo.scale.x < 2 && e.deltaY > 0) ||
(window.illo.scale.x > 80 && e.deltaY > 0) (window.illo.scale.x > 80 && e.deltaY < 0)
) { ) {
return; return;
} }
window.illo.scale.multiply( window.illo.scale.multiply(
1 + Math.max(Math.min(e.deltaY / 40, 0.9), -0.9) 1 - Math.max(Math.min(e.deltaY / 40, 0.9), -0.9)
); );
}); });
// Drag (move) // Drag (move)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment