Jump to content
Search Community

How to recalculate props before "Reverse"

iDVB test
Moderator Tag

Recommended Posts

We have this animation that turns animates a PURPLE circle with respect to a RED circle to feel the full screen.

Then when you close that (close button) it should animate back to the other circle. 

 

This currently works ONLY if you do not change the position of the RED circle by scrolling the page while the purple one is open.

https://codesandbox.io/s/vigilant-snow-yhf5q?file=/src/Circle.js

 

Is there some way to "recalculate" the props (location) of the circle when reversing?

 

Cheers!

See the Pen Circle.js by s (@s) on CodePen

Link to comment
Share on other sites

Yup... just wanted to be sure there isn't a simple built in way that lets me use the same timeline. Since its the exact same.... just needs to be recalculated. 

Edited by iDVB
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...