Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Support for Shared Element Transitions #7

Open
davidkpiano opened this issue Jul 27, 2016 · 0 comments
Open

Support for Shared Element Transitions #7

davidkpiano opened this issue Jul 27, 2016 · 0 comments

Comments

@davidkpiano
Copy link

Currently, flipjs supports implementing the FLIP technique for a single element that changes position due to a class change. However, a common use-case (similar to Android's Shared Element Activity Transitions) is that:

  • The final node is nearly equivalent to the initial node, save for differences in position/size.
  • The final node is not the same node as the initial node.

One strategy I've been using is [data-flip="foo"] on both the initial and final nodes, so that I can:

  • getBoundingClientRect() on the initial (currently visible) node
  • execute the code that removes the initial node and displays the final node
  • getBoundingClientRect() on the final (now visible) node
  • execute FLIP.

Perhaps we can supply an argument to last(...) that allows us to specify the new shared node?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant