How can I make double click event on node in d3.js?

前端 未结 2 1775
误落风尘
误落风尘 2021-02-03 19:00

I want to make double click event on nodes. So I tried

.on(\"dbclick\",function(d){return \"http://google.com\");});

and

.bin         


        
2条回答
  •  一整个雨季
    2021-02-03 19:28

    You can use "dblclick" instead of "dbclick":

    nodes.on("dblclick",function(d){ alert("node was double clicked"); });
    

提交回复
热议问题