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

Fix part of nodes programmatically #84

Open
MrFus10n opened this issue Mar 16, 2019 · 1 comment
Open

Fix part of nodes programmatically #84

MrFus10n opened this issue Mar 16, 2019 · 1 comment

Comments

@MrFus10n
Copy link

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!

@MrFus10n
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant