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

Is there support for crossfade? #179

Open
kryptn36 opened this issue Dec 22, 2020 · 6 comments
Open

Is there support for crossfade? #179

kryptn36 opened this issue Dec 22, 2020 · 6 comments
Labels
question Further information is requested

Comments

@kryptn36
Copy link

Hey 😄
Looks like crossfade isn't supported. Or am i wrong?

@ItalyPaleAle
Copy link
Owner

What do you mean?

@kryptn36
Copy link
Author

I mean the "crossfade" transition under Svelte Transitions to do something like this.

@ItalyPaleAle
Copy link
Owner

Yes it's supported

@ItalyPaleAle
Copy link
Owner

If you have problems with using it, feel free to open an issue!

@ItalyPaleAle ItalyPaleAle added the question Further information is requested label Dec 22, 2020
@kryptn36 kryptn36 changed the title Support for crossfade Is there support for crossfade? Dec 22, 2020
@Vanilagy
Copy link

Vanilagy commented Feb 3, 2023

Hey! First of all, thank you for this project - I'm sorry to dig up this old issue.

However, I think crossfades indeed do not work. I set up a pathological example of a left and right text that should be moving back and forth. If I include the two components manually using an {#if} on my own boolean, the transition works fine. Heck, even if I use the {#if} on svelte-spa-router's location export, it works. But it is when I switch to using <Router> that it stops working.

My guess would be that there's some sort desync happening here, that one element disappears before the other one appears, and therefore it can't find a match. NOTE: One important thing is that the send/receive functions used by the crossfades are the same, so put them in a separate .ts file or whatever and import those. So yeah, that part's figured out and that's not the culprit.

I wish I could send you a link to a Svelte REPL demonstrating this, however, the iframes there do not allow router navigation. But this example should only take about 10 minutes to reproduce.

@ItalyPaleAle ItalyPaleAle reopened this Feb 3, 2023
@ItalyPaleAle
Copy link
Owner

Reopened

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

No branches or pull requests

3 participants