retyui / react-quick-pinch-zoom

A react component that providing multi-touch gestures for zooming and dragging on any DOM element.
https://react-quick-pinch-zoom.netlify.app/
308 stars 46 forks source link

Added a 5-pixel tolerance to the drag event in order to allow clicking #57

Closed dminguez closed 2 years ago

dminguez commented 2 years ago

Hello! While using a draggable image on top of which we add some clickable elements, we noticed some clicks didn't come through as the user made a slight movement with their mouse while clicking, thus creating a drag event instead.

We added an arbitrary 5 pixels tolerance to the drag event so a click might still happen if the movement is too short.

Let me know what you think, thanks!

retyui commented 2 years ago

@dminguez Thanks for contribution! looks great

dminguez commented 2 years ago

@retyui When do you think a new version could be published? Thanks in advance!

retyui commented 2 years ago

Released: 4.5.0

diff: 4.4.0...4.5.0