anvaka / panzoom

Universal pan and zoom library (DOM, SVG, Custom)
https://anvaka.github.io/panzoom/demo/attach-via-script.html
MIT License
1.79k stars 287 forks source link

Override default onDoubleClick Functionality #294

Open RahulRaj97 opened 1 year ago

RahulRaj97 commented 1 year ago

Hi Team. I hope you are all doing good. I recently integrated panzoom in our organization and its really great and helpful. Kudos to the team :)

I am stuck with an issue and needed some help. I want to prevent the default onDoubleClick functionality and implement my own. I see this as a solution but it didn't work for me: https://github.com/anvaka/panzoom/issues/46. Adding

panzoom(element, { zoomDoubleClickSpeed: 1, });

disables the smoothZoom func. Any help would mean a lot. Thanks