Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support scrolling on non-window element #34

Open
Akkuma opened this issue Jun 18, 2018 · 4 comments
Open

Support scrolling on non-window element #34

Akkuma opened this issue Jun 18, 2018 · 4 comments

Comments

@Akkuma
Copy link

Akkuma commented Jun 18, 2018

Thanks for making react-plx. I've ran into a semi-serious feature that doesn't yet exist in that all scroll events are expected to come from the window. This makes it impossible to do something like body { overflow: hidden; } and have some child element actually be the one scrolling.

The feature request would be for plx to accept a scroll target, which means implementing it in both plx and scroll manager.

@Stanko
Copy link
Owner

Stanko commented Jun 19, 2018

Hello @Akkuma,
It is a tricky one indeed. I had an idea of adding scrollPosition (or just position) prop, and if it is passed it should be used instead of window scroll tracking. It would cover your case (scrolling elements instead of widow) but it would add additional flexibility.

It shouldn't be too hard, but I have a lot of going on atm, so I'm not sure when I'll get to it.

Cheers!

@ZakTax
Copy link

ZakTax commented Jul 30, 2018

+1 on this

@josantana
Copy link

Anyone working on this subject?

Got all my animations working with react-plx, but after applying the full layout, I had to move the scroll target to a specific div tag and... damn. :(

@Stanko
Copy link
Owner

Stanko commented Dec 10, 2019

I don't have time to tackle this ATM, but I would gladly accept a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants