繁体   English   中英

call(force.drag)的含义

[英]the meaning of call(force.drag)

我正在尝试将http://bl.ocks.org/sebbacon/6138241 (应该是 d3 v3)重写为 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 + ")";
    });

我可以知道.call(force.drag)是什么意思吗
这似乎已经不适用于 d3 v5。

从我的研究看来 force.drag function 将适用于“g”的选择,但它是否适用于每个节点的“g”?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM