I am trying to rewrite http://bl.ocks.org/sebbacon/6138241 (should be d3 v3) to d3 v5
var nodeg = node.enter()
.append("g")
.attr("class", "node").call(force.drag) # here
.attr("transform", function(d) {
return "translate(" + d.x + "," + d.y + ")";
});
may I know what is the meaning of .call(force.drag)
this seems not working at d3 v5 already.
From my research seems the force.drag function is going to apply on the selection of "g", but does it apply to every "g" referring to every node?