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

Position nodes absolutely when outroing them, if animations are involved #1457

Merged
merged 4 commits into from
May 14, 2018

Conversation

Rich-Harris
Copy link
Member

@Rich-Harris Rich-Harris commented May 14, 2018

Best shown with a GIF:

flip-transitions-2

There's a little bit of magic here, which you opt in to when you use the animate directive. There could be some situations where this approach results in glitchiness, though I can't think of any off the top of my head. (Maybe if the node already has transforms involving scaling/rotation etc?)

This is a little tricky to test with JSDOM... not sure if there's a great way around that 😬

TODO:

  • Pass in the destroy function to updateKeyedEach from EachBlock, so that apps that aren't using animate don't have to bear the extra weight

@Rich-Harris Rich-Harris changed the title [WIP] Position nodes absolutely when outroing them, if animations are involved Position nodes absolutely when outroing them, if animations are involved May 14, 2018
@Rich-Harris Rich-Harris merged commit 8cec6db into master May 14, 2018
@Rich-Harris Rich-Harris deleted the gh-1455 branch May 14, 2018 14:59
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

Successfully merging this pull request may close these issues.

1 participant