-
Notifications
You must be signed in to change notification settings - Fork 269
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
Allow loopback edges #299
base: master
Are you sure you want to change the base?
Allow loopback edges #299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide example of expected display. I wasn't able to see the behavior when I checked out to your branch. Thanks!
@@ -664,6 +661,7 @@ class Graph extends React.Component<IGraphProps, IGraphState> { | |||
onCopySelected={this.onCopySelected} | |||
onPasteSelected={this.onPasteSelected} | |||
layoutEngineType={this.state.layoutEngineType} | |||
allowLoopbackEdge={true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please expose this in example similar to allowMultiselect
graph.edges = [...graph.edges, viewEdge]; | ||
this.setState({ | ||
graph, | ||
selected: viewEdge, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this code needs to be updated (see merge conflicts)
Closes Bug: Edges with a target node equaling the source node should display as a loopback edge which can be selected #101
Added
allowLoopbackEdge
propertyIf
allowLoopbackEdge
is set to true, the mouse enter allows to set theedgeEndNode
to the node from which the edge started.