Skip to content

Commit

Permalink
Merge pull request #99 from iamsoorena/dont-create-orphaned-edges
Browse files Browse the repository at this point in the history
Avoid creating orphan edges
  • Loading branch information
ajbogh authored Feb 27, 2019
2 parents f40c8c7 + 2811586 commit 1ce3f3a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/components/graph-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,18 +608,12 @@ class GraphView extends React.Component<IGraphViewProps, IGraphViewState> {
!edgesMap[mapId1] &&
!edgesMap[mapId2]
) {
const edge: IEdge = {
source: hoveredNodeData[nodeKey],
target: edgeEndNode[nodeKey]
};
this.setState({
componentUpToDate: false,
draggedEdge: null,
draggingEdge: false,
});

// this syncRenderEdge will render the edge as un-selected.
this.syncRenderEdge(edge);
// we expect the parent website to set the selected property to the new edge when it's created
onCreateEdge(hoveredNodeData, edgeEndNode);
} else {
Expand Down

0 comments on commit 1ce3f3a

Please sign in to comment.