react-digraph icon indicating copy to clipboard operation
react-digraph copied to clipboard

Bidirectional graph

Open lucjdo opened this issue 6 years ago • 5 comments

Hello, there is any way to connect two nodes in both directions? I can't figure out how to solve it Thanks

lucjdo avatar Jul 08 '19 15:07 lucjdo

I was also looking for this, in the meanwhile I made a fork of the library and currently working on adding support for this feature uber/react-digraph#149.

If it's useful for anyone, I published a NPM package with it just to have something with support for it so we can keep shipping while we complete the feature: https://www.npmjs.com/package/react-bidigraph

TheMightyPenguin avatar Jul 16 '19 16:07 TheMightyPenguin

Currently we only allow marker-end elements on edges. In a bi-directional system we could add a marker-start to the edge and adjust the edge accordingly. We would have to check if an edge is already connected in one direction (A => B) due to a previous edge rendering, which would set up the marker-end, then we would set up the marker-start for the opposite direction (B => A).

ajbogh avatar Jul 17 '19 04:07 ajbogh

Got it @ajbogh, I'll refactor the Pull Request to implement it like you describe it 😄

TheMightyPenguin avatar Jul 17 '19 15:07 TheMightyPenguin

@TheMightyPenguin Were you able to get the pull request going? I'm interested in using a bidirectional graph and really like this graph library.

laijow96 avatar May 28 '20 14:05 laijow96

Yeah, I would also like to see this to be implemented. I can create bidirectional edges programatically with code but not with dragging in the browser 😞

sikorski-as avatar Oct 13 '20 12:10 sikorski-as