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

Nodes added or deleted from a graph with nodes in fixed positions will cause issues #151

sammaniamsam opened this issue Nov 27, 2018 · 4 comments


Copy link

@sammaniamsam sammaniamsam commented Nov 27, 2018

If you set <fx, fy> (fixed static) for some of the nodes on your graph and add or delete nodes thereafter your graph will "break" and become un-editable.


This comment has been minimized.

Copy link

@danielcaldas danielcaldas commented Nov 27, 2018

Now that I noticed it seems to happen even without setting specific fx or fy 🤔

@danielcaldas danielcaldas added the bug label Nov 27, 2018

This comment has been minimized.

Copy link

@sammaniamsam sammaniamsam commented Nov 28, 2018

Thanks, Daniel

@stale stale bot added the wontfix label Feb 7, 2019
Repository owner deleted a comment from stale bot Feb 10, 2019
@stale stale bot removed the wontfix label Feb 10, 2019

This comment has been minimized.

Copy link

@danielcaldas danielcaldas commented Mar 3, 2019

Just revisited this issue, seems that somehow the problem is not on the setting of fx and fy but rather on the nodes which are removed from the graph, therefore I'm closing this as it is a client-side integration issue. This can be easily triggered in the react-d3-graph sandbox where nodes and links are removed randomly and depending on the removed node and links the sandbox can break due to the randomness of the sample implementation. Before removing the nodes you should always remove the links that are source or target of the removed node.

Check the implementation that causes the issue:

     * Remove a node.
    onClickRemoveNode = () => {
        if ( && {
            const id =[0].id;

  , 1);
            const links = => l.source !== id && !== id);
            const data = { nodes:, links };

            this.setState({ data });
        } else {
            window.alert('No more nodes to remove!');

This comment has been minimized.

Copy link

@danielcaldas danielcaldas commented Mar 28, 2019

From the screenshot, it seems that this issue also pointed out this one #183 which is going to be fixed here #186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.