Is your feature request related to a problem? Please describe.
The calculateOffset edge function retrieves node elements from the DOM using IDs, but it would be much faster in theory, and perhaps safer, to pass the sourceNode and targetNode React elements using refs. This method would also survive server-side rendering since it wouldn't need document methods.
Describe the solution you'd like
Modify the Edge component to accept sourceNodeRef and targetNodeRef. Pass those refs to the calculateOffset function and any other function that requires it. Use ref.current property to retrieve the DOM element for analysis.
Is your feature request related to a problem? Please describe. The calculateOffset edge function retrieves node elements from the DOM using IDs, but it would be much faster in theory, and perhaps safer, to pass the sourceNode and targetNode React elements using refs. This method would also survive server-side rendering since it wouldn't need document methods.
Describe the solution you'd like Modify the Edge component to accept sourceNodeRef and targetNodeRef. Pass those refs to the calculateOffset function and any other function that requires it. Use ref.current property to retrieve the DOM element for analysis.
Describe alternatives you've considered None