In my HTML File, I am using D3JS to display graphs. You can find the working example in this link here. I understand that the function below should allow me to fix node positions when dragging and dropping:
var drag = force.drag()
.on("dragstart", dragstart);
function dragstart(d) {
d3.select(this).classed("fixed", d.fixed = true);
}
Despite implementing this code, I am still unable to lock node positions after dragging them. What I'm looking for can be seen in the functionality demo at this link. How can I modify it so nodes remain fixed in their new position without reverting back?