I've been working on it. I have something that's a good starting point. See
demo at: http://jsbin.com/tepoko/1/edit?html,output
MutationEvents did not work out. Instead, I monitor changes to my the
model, and animate additions/deletions.
Aleks
On Monday, November 10, 2014 8:52:14 AM UTC-8, Tim Cash wrote:
>
> I am also interested in this functionality. Did you come to your own
> solution?
>
> On Wednesday, 5 November 2014 15:27:22 UTC-8, Aleks Totic wrote:
>>
>> 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/32dddb20-1b1a-4624-b1a9-e8f459e7e0d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.