Skip to content

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

Merged
Rich-Harris merged 4 commits intomasterfrom
gh-1455
May 14, 2018
Merged

Position nodes absolutely when outroing them, if animations are involved#1457
Rich-Harris merged 4 commits intomasterfrom
gh-1455

Conversation

@Rich-Harris
Copy link
Copy Markdown
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