I want to animate transitions of repeated templates. It is non-obvious how
to do it.
Is there a pattern others are using? Any hints?
What I am trying to do:
<template repeat="{{item in items}}">
<div>{{item.title}} {{item.count}}</div>
</template>
I want to slide in items being added, and fade out items getting removed.
Items list can be modified without me knowing what modification was
(firebase-element).
1st attempt was to animate on dom mutation events.
I'd use events to detect insertion/removal, and animate when detected.
Detection used mutations traversal, and is still buggy. This approach feels
kludgy:
- there is code that knows when insertion/removal happens, I should not
have to reverse engineer these
- lots of mutation events, feels inefficient
2nd attempt was going to be hacking TemplateBinding.
TemplateIterator.insertInstanceAt and extractInstanceAt have the data I
need. Monkeypatching this will cause future headaches, so I decided to ask
the group before diving in.
Thanks,
Aleks
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/d48f78fb-c39e-4461-82e9-446e0e9c80fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.