react-d3-graph
react-d3-graph copied to clipboard
I need a way to set the transofrm state that controls the position of the graph (which gets called on dragging the graph)
I have four arrows controls, up, right, down and left, which moves the entire graph up, right, down and left by setting the transform attribute of the g element which is the first child of the svg element. the problem is that react-d3-graph doesn't know that I updated the position of the graph, so whenever I drag the graph after moving it via the arrows controls, it moves the graph from the previous position because it doesn't know that I updated the position of the graph. So I need to set the transform state that controls the position of the graph (which gets called on dragging the graph) on using the arrows controls