5 is
: 'cascaded-animation',
8 Polymer
.NeonAnimationBehavior
13 /** @type {!Polymer.IronMeta} */
17 return new Polymer
.IronMeta({type
: 'animation'});
26 * nodes: !Array<!Element>,
27 * nodeDelay: (number|undefined),
28 * timing: (Object|undefined)
31 configure: function(config
) {
32 var animationConstructor
= /** @type {Function} */ (
33 this._animationMeta
.byKey(config
.animation
));
34 if (!animationConstructor
) {
35 console
.warn(this.is
+ ':', 'constructor for', config
.animation
, 'not found!');
39 this._animations
= [];
40 var nodes
= config
.nodes
;
42 var nodeDelay
= config
.nodeDelay
|| 50;
44 config
.timing
= config
.timing
|| {};
45 config
.timing
.delay
= config
.timing
.delay
|| 0;
47 var oldDelay
= config
.timing
.delay
;
48 for (var node
, index
= 0; node
= nodes
[index
]; index
++) {
49 config
.timing
.delay
+= nodeDelay
;
52 var animation
= new animationConstructor();
53 var effect
= animation
.configure(config
);
55 this._animations
.push(animation
);
58 config
.timing
.delay
= oldDelay
;
60 this._effect
= new GroupEffect(effects
);
64 complete: function() {
65 for (var animation
, index
= 0; animation
= this._animations
[index
]; index
++) {
66 animation
.complete(animation
.config
);