Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Edge labels also avoid overlaping with each other #25

Open
0xJem opened this issue Apr 26, 2022 · 2 comments
Open

Make Edge labels also avoid overlaping with each other #25

0xJem opened this issue Apr 26, 2022 · 2 comments
Labels
enhancement New feature or request pinned This should not be closed by bots on inactivity
Projects

Comments

@0xJem
Copy link

0xJem commented Apr 26, 2022

Two edge labels could overlap. It would be even better if we could configure the labels of different edges to not overlap.

@tisoap
Copy link
Owner

tisoap commented Apr 27, 2022

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.

@tisoap tisoap added enhancement New feature or request help wanted Extra attention is needed labels Apr 27, 2022
@tisoap tisoap assigned tisoap and unassigned tisoap Apr 27, 2022
@tisoap tisoap changed the title Edge labels avoid overlap Make Edge labels also avoid overlaping with each other Apr 27, 2022
@tisoap tisoap added the pinned This should not be closed by bots on inactivity label May 16, 2022
@tisoap tisoap added this to New in Kanban Jun 10, 2022
@tisoap tisoap removed the help wanted Extra attention is needed label Jun 10, 2022
@tisoap
Copy link
Owner

tisoap commented Oct 23, 2022

Opened issue on React Flow: xyflow/xyflow#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned This should not be closed by bots on inactivity
Projects
No open projects
Kanban
  
To Do
Development

No branches or pull requests

2 participants