node = node.data(graph.nodes) .enter().append("circle") .attr("class", "node") .attr("r", 12) .on("dblclick", dblclick) .call(drag);
var drag = force.drag().on("dragstart", dragstart);
function dblclick(d) {d3.select(this).classed("fixed", d.fixed = false);}function dragstart(d) {d3.select(this).classed("fixed", d.fixed = true);}
Sticky Force Layout
最新推荐文章于 2024-06-03 06:38:17 发布