Skip to content

Fix part of nodes programmatically #84

Open

Description

@MrFus10n

Hey,

I need to create 4 nodes at the edges of the screen and see how network grows among them (with auto positioning). Of course I can move them with stickyDrag: true, but this is too time-consuming as I need to make lots of experiments.

Thanks!

Activity

  1. MrFus10n commented on Mar 17, 2019

    @MrFus10n
    Author

    Found a hacky way to set node position:

    let node = G.node.get(1);
    node.__d3datum__.px = 10;
    node.__d3datum__.x = 10;
    node.__d3datum__.py = 10;
    node.__d3datum__.y = 10;
    node.__d3datum__.fixed = 1;
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions