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

Delay an animation until a particular event has triggered #213

Open
jessepinho opened this issue Jul 25, 2023 · 0 comments
Open

Delay an animation until a particular event has triggered #213

jessepinho opened this issue Jul 25, 2023 · 0 comments

Comments

@jessepinho
Copy link

jessepinho commented Jul 25, 2023

Hey @aholachek,

Freaking love this library. It's the first FLIP library I've used and it's fantastic. Thanks for your work!

My website uses react-flip-toolkit to animate the homepage images when they're clicked. Sometimes, though, that there's a brief moment when the image is blank before it fills back out again. (It's even longer on slow connections, since it's loading a higher-resolution version of the image.)

What I'd like to do (from a user's point of view) is this:

  1. When a user clicks an image, a loading spinner appears over it.
  2. When the transitioned image loads, the loading spinner disappears.
  3. Then, the animation happens, transitioning between pages.

I can't figure out, though, how to use handleEnterUpdateDelete to wait until the new image is finished loading. Is that possible? There doesn't seem to be a way to have the old and new elements of the transition "know" about each other to do something like this — especially during a route transition.

Thanks for your help!

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

1 participant