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

Get left element position after react-spring animation #14

Open
frankPairs opened this issue May 6, 2020 · 1 comment
Open

Get left element position after react-spring animation #14

frankPairs opened this issue May 6, 2020 · 1 comment

Comments

@frankPairs
Copy link

Hi everyone!

First at all, congratulation for your job with react-spring and react-use-measure: I am starting to use it and it's awesome the things you can do with simple code.

The issue I found is after trying to get the left position of an element.

I tried to get it from an animated element (via react-spring). I noticed that useMeasure hook is retuning the bounds object with the left position equals to the start of the animation.

Is there any way to get the position from useMeasure after the animation is completed?

Thanks in advance.

@williaster
Copy link
Contributor

in vx we have a similar need to update bounds when the element moves/changes position, not just on scroll or resize as implemented now. Would you consider updating to handle this case?

I was wondering if using IntersectionObserver might be a way to detect the movement.

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

No branches or pull requests

2 participants