// Compute the start/end for each target, and determine the length of our animation
this.length = this.duration;
for ( var i = 0; i < this.targets.length; i++ ) {
var target = this.targets[ i ];
target.computeStartEnd();
// If we don't have a computed length yet, check all of our targets
if ( this.length === null ) {
this.length = target.getPreferredDuration();
}
}
That is, it uses the Animation.length, if specified, otherwise it uses the preferred duration of the first child that has one. Is this correct? Should it use the max of all the children with preferred durations? What if a child has a preferred duration longer than Animation.length?
It seems that only one child can supply a preferred duration, so this should be a non-issue. @jonathanolson if that's correct, let me know and I'll add a comment to that effect.
During #11 I noticed this code in Animation.js
That is, it uses the Animation.length, if specified, otherwise it uses the preferred duration of the first child that has one. Is this correct? Should it use the max of all the children with preferred durations? What if a child has a preferred duration longer than Animation.length?