D3 transition looping throwing Uncaught TypeError: t.call is not a function

后端 未结 1 1265
耶瑟儿~
耶瑟儿~ 2021-01-04 00:07

Very new to D3 and relatively new to JS in general. I am trying to create a circle on click, and that circle once created needs to repeatedly pulsate forever. Right now, it

相关标签:
1条回答
  • 2021-01-04 00:53

    This is because you are using d3 version4. There has been a major change in the v4 API, so:

    Instead of using

    // ...   
    .each("end", pulsate);//in d3 version 3
    

    do

    // ...   
    .on("end", pulsate);//in d3 version 4
    

    refer: https://github.com/d3/d3-transition#transition_on

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