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

Orphan Edges #265

Open
Malikx-Alee opened this issue Sep 2, 2020 · 1 comment
Open

Orphan Edges #265

Malikx-Alee opened this issue Sep 2, 2020 · 1 comment

Comments

@Malikx-Alee
Copy link
Contributor

Malikx-Alee commented Sep 2, 2020

"Avoid creating orphan edges"
Issue already discussed and fix was merged but it occurred again, already discussed here:
#99

onSwapEdge = (
    sourceViewNode: INode,
    targetViewNode: INode,
    viewEdge: IEdge
  ) => {
    this.setState({
      showNodeMenu: false,
      showEdgeMenu: false,
      showGlobalPropertiesMenu: false,
      showAddNodeMenu: false,
    });

    if (targetViewNode.type === "Data") {
      this.state.graph.nodes.forEach((element) => {
        this.GraphView.asyncRenderNode(element);
      });

      return false;
    }
)}

In the onSwap function if have implemented a check and return false if condition is met, but it still creates a edge on the graph.

I am still facing this issue while i am using the release after the bug was removed. Here is the video link which explain whats happening.

https://www.loom.com/share/53429bbba058425e90a51a4c1c96f8ee

@ajbogh
Copy link
Contributor

ajbogh commented Nov 16, 2020

Thanks for creating this issue. Please update to 7.0.0-alpha.5 to see if the issue is still present and let us know. Thanks!

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

No branches or pull requests

2 participants