Stop moving other nodes while dragging one node in D3 forceSimulation
问题 I made a D3 forced-directed graph by d3.forceSimulation() and attached the drag function. While clicking one node, I don't want other nodes to move accordingly. Now I can freeze the node being dragged by setting the d.fx and d.fy as the following: function dragended(d) { if (!d3.event.active) simulation.alphaTarget(0); d.fx = d.x; d.fy = d.y; } Is it possible to freeze all the other nodes while dragging one node? 回答1: Thanks @rioV8 for the hint! I tried to fix the other nodes while dragging