react-zoom-pan-pinch
react-zoom-pan-pinch copied to clipboard
Is it possible to connect panning to a scroll event?
Hello,
I've been working on implementing a panning effect activated by scrolling in my project. My approach involved syncing the ScrollView’s coordinates to the transformX and transformY properties. However, this method led to a laggy experience.
Current Approach:
I did write a hook that listens to the scroll position.
I altered the position with the setTransform(newPositionX, newPositionY)
function.
Unfortunately, this has resulted in a less-than-smooth panning effect. Has anyone successfully implemented a scroll-triggered panning effect without encountering lag? Any suggestions or solutions would be greatly appreciated.
Thanks in advance!
Did you find any solution, i am triying to do more or less the same thing
Solution. #441