Closed damiano216 closed 1 year ago
use a shouldInterceptWheel
pror
const shouldInterceptWheel = event => !(event.ctrlKey || event.metaKey); // default
// but you need always sent true
const shouldInterceptWheel = event => true; // use it
Hello,
Using
<QuickPinchZoom
onUpdate={onUpdate}
shouldInterceptWheel={(e) => {
e.ctrlKey || e.metaKey;
}}
>
I made zooming work for both the mouse and the laptop touchpad.
Thanks
just for better understanding, your function return nothing
const shouldInterceptWheel = (e) => {
e.ctrlKey || e.metaKey;
}
shouldInterceptWheel() // undefined
Yes, the function returns nothing.
But by using it this way, I achieved the desired result to have: -zooming using the laptop touchpad AND -zooming by using the mouse wheel - without having to press any key at the same time
I understand that it may not be a solution as per the official documentation, but it solved our necessities :)
Hello,
How can I enable mouse wheel zooming without having to hold on the ctrl keyboard button?
Currently I am using the package like this: