Queue of transitions in d3.js; one by one

前端 未结 1 867
执笔经年
执笔经年 2021-01-14 04:49

I\'ve tried to make chained transitions in d3.js. For this I define a set of transitions in an array and (try) make a function to call recursively them using .each(\"e

1条回答
  •  走了就别回头了
    2021-01-14 05:42

    You're almost there!

    Instead of

    return animations[index]().each("end", animate(index))
    

    you need

    return animations[index]().each("end", function() { animate(index) })
    

    See updated jsFiddle

    0 讨论(0)
提交回复
热议问题