dagrejs / dagre

Directed graph layout for JavaScript
MIT License
4.62k stars 600 forks source link

Positioning: place bends at rank extremes #137

Open cpettitt opened 10 years ago

cpettitt commented 10 years ago

Position bends so that their coordinate is not a the center, but is at the extreme of the rank closest to the nearest node. This should reduce the cases where edges cross behind nodes on the rank where they bend.

ikaky commented 6 years ago

In our fork of fork xD we have solved all edges and nodes crossing with this two solutions (but second solution didn't work perfect with "curveBasis").

crossing type 1 crossing_type1_solution

crossing type 2 crossing_type2_solution

cpettitt commented 6 years ago

Nice! Is this something you'd be willing to push upstream as a PR?

ikaky commented 6 years ago

Sure i will do. Just wanted to know is a required functional for library in general.

cpettitt commented 6 years ago

This will be useful to others. I'd like to see the impact with curveBasis. What we can do for now is guard this with an option so that users can opt in. If we can work through the kinks I'd love to make this a default.