web-anim-js icon indicating copy to clipboard operation
web-anim-js copied to clipboard

resolutionStrategy target: fails if no targets provided to parent group

Open shans opened this issue 13 years ago • 0 comments

see web-animation-test.html.

It should be possible to set up a complex animation template with child nodes targeting specific element ids, then trigger the whole thing with an animate call that has an empty element list:

var a = AnimTemplate(..., "target: a"); var b = ParAnimGroupTemplate([a, ...]); b.animate([], 0);

This used to work because [] was erroneously treated as [Array(0)]. Now it doesn't, because the group's __animate method iterates over the targets (of which there are none) even though those targets don't get used lower down.

shans avatar Nov 21 '12 12:11 shans