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

Problems with clearing and reloading all nodes. #44

Closed
sljm12 opened this issue Jul 16, 2013 · 2 comments
Closed

Problems with clearing and reloading all nodes. #44

sljm12 opened this issue Jul 16, 2013 · 2 comments

Comments

@sljm12
Copy link

sljm12 commented Jul 16, 2013

I have a problem with clearing and loading all nodes again.

This is the sequence that i use to clear the nodes

graph.clear();//remove all nodes
loadAllNodes(); This will perform an ajax call that will load the nodes and then run renderer.run() at the completion of the call

Within the loadAllNodes i used graph.beginUpdate(); and graph.endUpdate() to addNode and addLink

There will be an error TypeError: toNode.position is undefined.

What should the correct sequence be for clearing all nodes and reloading them?
Do i need to pause the renderer?

Thanks, I will try to submit a jsfiddle with the probelm

@sljm12
Copy link
Author

sljm12 commented Jul 16, 2013

Just to add that the error occurs on line 2780 cachedToPos.x=toNode.position.x

@anvaka
Copy link
Owner

anvaka commented Jul 20, 2013

Looks like layout did not properly initialized nodes. I recently changed how it works, potentially it should fix this issue too. Could you please get the latest version of vivagraph and verify?

@anvaka anvaka closed this as completed Jun 8, 2014
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