You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe the feature that you want to propose
I'm the author of React Flow Smart Edge. Right now I'm using useNodes hook to get all nodes in the graph to do path finding on my custom edge. It would be great if React Flow could also provide me with a useLabels hook to return all "label" elements and their information (size and position), so that I can also include them on the path finding logic and make my custom edge avoid intersecting with them.
The text was updated successfully, but these errors were encountered:
Hey @tisoap ! This is an interesting idea but we won't add this feature. The edge labels are defined in the edge components and it's really hard to get that information in an performant way. If you really need this you need to implement your own helper function for this. I think there is no other way right now than do some calculations with the help of getBBox whenever the nodes change.
@moklick Understandable. I think what I'll end up doing is some form of inversion of control where users can pass down areas on the graph to avoid, and let up to them if it's worth to track the position of every label of their graph
Please describe the feature that you want to propose
I'm the author of React Flow Smart Edge. Right now I'm using
useNodes
hook to get all nodes in the graph to do path finding on my custom edge. It would be great if React Flow could also provide me with auseLabels
hook to return all "label" elements and their information (size and position), so that I can also include them on the path finding logic and make my custom edge avoid intersecting with them.The text was updated successfully, but these errors were encountered: