Disable wheel event
benben994 opened this issue · 5 comments
Hi I'm wondering is there any way that I can disable only wheel event for zooming?
I saw the onChange$ subscribe all resize, rotate event.
But I only need to prevent user to use mouse wheel.
Thanks.
Hi @benben994 ,
I'm afraid not, zooming by wheel is the natural feature of clipper-fixed, and should not be disabled.
You can use clipper-basic instead.
This option would be really nice. I need all the features of clipper-fixed but I just want to prevent zooming with the mouse wheel, I tried to capture the wheel event and use preventDefault but it doesnt work. At least it would be nice that the wheel event would emit an event that could be capture in the parent so we could update the range accordingly.
My problem is that I use a slider to control the zoom, but i cannot sync it with the mouse wheel nor disable the mouse wheel which would prevent the problem
New feature in the next version
Add a prop handleZoomEvent to intercept both mouse and touch zooming events.
Example:
<clipper-fixed :handle-zoom-event={handleZoomEvent}/>// method
handleZoomEvent: function (scale) {
// fires when bgWH$ is about to change
// normal behavior
return scale;
// disable zoom
return NaN;
}@timtnleeProject thank you so much. Awesome plugin!
v3.0.3 released