uber / react-digraph

A library for creating directed graph editors
MIT License
2.63k stars 268 forks source link

find non-empty edge element for panToNode method #354

Closed chenyunw-uber closed 1 year ago

chenyunw-uber commented 1 year ago

There is a bug where the graph cannot locate the correct edge position when panTo. This is because there are two element with same id but the first one is empty. For example

Screenshot 2023-09-05 at 12 13 08

To fix this, we do querySelectorAll and try to find the correct edge.