Describe the bug
Focusing on a node makes it difficult to move the graph around.
Expected behavior
When dragging the graph after focusing on a node, the focused node becomes un-focused and the graph moves smoothly
Actual behavior
When dragging the graph after focusing on a node, the graph will jump around.
Steps To Reproduce
Steps to reproduce the behavior:
Open the list of nodes
Click on a node to center it in the viewport
Try to drag the viewport around
The viewport will "jump" around, sometimes to the origin (0,0)
Screenshots
Additional context
Currently, un-focusing on the currently focused node is triggered by the onClickGraph event handler passed into the Graph from react-d3-graph. This has an _onDragStart "instance member" that needs to be hooked into here but it looks like that cannot be passed a handler via props.
Describe the bug Focusing on a node makes it difficult to move the graph around.
Expected behavior When dragging the graph after focusing on a node, the focused node becomes un-focused and the graph moves smoothly
Actual behavior When dragging the graph after focusing on a node, the graph will jump around.
Steps To Reproduce Steps to reproduce the behavior:
(0,0)
Screenshots
Additional context
Currently, un-focusing on the currently focused node is triggered by the
onClickGraph
event handler passed into theGraph
fromreact-d3-graph
. This has an_onDragStart
"instance member" that needs to be hooked into here but it looks like that cannot be passed a handler via props.Environment