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

Bug: Edges with a target node equaling the source node should display as a loopback edge which can be selected #101

Open
ajbogh opened this issue Dec 13, 2018 · 6 comments · May be fixed by #299

Comments

@ajbogh
Copy link
Contributor

ajbogh commented Dec 13, 2018

Describe the bug
When an edge's sourceNode and targetNode are the same, currently the edge is rendered as a point with an arrow hanging off it. This point is not selectable, so the edge cannot be deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Using the data, create an edge that has the same source and target node.
  2. Attempt to delete it.

Expected behavior
The edge should be allowed to exist (although there should be no way to create one in react-digraph)

Instead of rendering the edge as a point, make it a line that exits the source node and then returns to the source node in a different position (exit at right, return at top). Provide enough space to allow the user to select the edge for deletion.

@MrF3lix
Copy link

MrF3lix commented Mar 18, 2021

Hey @ajbogh
I have a working solution for this and could create a PR if you'd like to.

As far as I understand you'd like the expected behaviour to be that loopback edges are allowed but cannot be created? Right now I have a solution that would allow the creation of these loopback edges through react-digraph.

@ajbogh
Copy link
Contributor Author

ajbogh commented Mar 18, 2021

That would be great. If you can also create a loopback within the UI then that is perfect.

Please include this as a parameter to enable this new functionality so we are backwards compatible.

@MrF3lix MrF3lix linked a pull request Mar 18, 2021 that will close this issue
@MrF3lix
Copy link

MrF3lix commented Mar 18, 2021

I created the PR. Right now the allowLoopbackEdge only restricts the creation of loopbacks within the UI.
Should it also restrict drawing them if they already exists in the data?

@marvindv
Copy link

Any news on this? Thanks!

@ajbogh
Copy link
Contributor Author

ajbogh commented Jul 21, 2021

@adriannesoike @ksnyder9801.

@adriannesoike
Copy link
Contributor

Thanks for the tag @ajbogh.

@MrF3lix added a couple comments to your diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants