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

fix #50: cancel handled touch actions #51

Closed martinkutter closed 2 years ago

martinkutter commented 2 years ago

…ize changes

retyui commented 2 years ago

Note: It is possible to drag an image with zoom factor = 1 when verticalPadding & horizontalPadding aren't zero:

https://user-images.githubusercontent.com/95620376/165758316-4fbe4d10-7511-4363-85c9-20c634cffaf6.mp4

Could you please handle this case too?

martinkutter commented 2 years ago

Thank you for your fast feedback. Any recommendations for the prop name? Would shouldCancelHandledTouchEndEvents?: boolean default false fit?

martinkutter commented 2 years ago

I changed the behavior to cancel only events when visual changes have been made and added the props to enable it.