Open 0xJem opened 2 years ago
That's a really neat idea @0xJem ! But I'm afraid it wouldn't be easy to implement. I'm able to do path finding using the nodes because React Flow gives me an useNodes
hook that I can use to get all nodes in the graph. There's no equivalent for just labels, since they're part of the edges.
I'll leave this open so I can brainstorm later if there's anything that can be done.
Opened issue on React Flow: https://github.com/wbkd/react-flow/issues/2522
Edit: Negative response from the React Flow developer to expose an "useLabels
" equivalent, will have to think about an alternative solution. Maybe doing inversion of control and letting user set arbitrary areas on the map to avoid will be the solution here.
Two edge labels could overlap. It would be even better if we could configure the labels of different edges to not overlap.