dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.84k stars 587 forks source link

Arrow heads should be rendered above nodes #322

Open christianvoigt opened 6 years ago

christianvoigt commented 6 years ago

Arrow heads should be rendered above nodes, I think. The tip of the arrow gets "cut off" by the node edge, which does not look good. See: http://www.samsarin.com/project/dagre-d3/latest/demo/arrows.html

A simple fix would probably be to change the order of nodes and edges in the svg so that edges come last. This can currently not be fixed by using css, because z-index is only supported in SVG 2.

christianvoigt commented 6 years ago

Obviously it would be even better if the tip of the arrow really touched the border of the node.

krilbert commented 4 years ago

I totally agree, today I faced this, what I ended up doing is this:

svg.select('.output').insert(() => d3.select('.nodes').remove().node(), '.edgePaths')

Not a fan, but works in the meantime