react-zoom-pan-pinch icon indicating copy to clipboard operation
react-zoom-pan-pinch copied to clipboard

Is it possible to connect panning to a scroll event?

Open MichaelPHolstein opened this issue 1 year ago • 2 comments

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!

MichaelPHolstein avatar Nov 15 '23 20:11 MichaelPHolstein

Did you find any solution, i am triying to do more or less the same thing

montasellx avatar Dec 26 '23 10:12 montasellx

Solution. #441

edge-rps avatar Jan 25 '24 00:01 edge-rps