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

get unlinked nodes for a given node (aka. forEachUnlinkedNode) #15

Closed
arikan opened this issue Dec 28, 2012 · 4 comments
Closed

get unlinked nodes for a given node (aka. forEachUnlinkedNode) #15

arikan opened this issue Dec 28, 2012 · 4 comments

Comments

@arikan
Copy link

arikan commented Dec 28, 2012

Based on the forEachLinkedNode method in core/graph.js the code below would give the "unlinked" nodes for a given node. But not sure about if the underscore method _.difference would work in VivaGraphJS?

https://gist.github.com/4396945

@anvaka
Copy link
Owner

anvaka commented Jan 3, 2013

Looks like you are using internal nodes variable as a first argument for _.difference. The problem though nodes is defined as a hash dictionary, not an array... I updated your gist

@arikan
Copy link
Author

arikan commented Jan 4, 2013

Hi Anvaka, thanks a lot for the update. It works well.

It would be great to also get the "unlinked" links in the callback?

@anvaka
Copy link
Owner

anvaka commented Jan 5, 2013

@arikan uhm... I'm sorry, I do not understand. What do you mean?

@arikan
Copy link
Author

arikan commented Jan 7, 2013

I meant getting the connections of unlinked nodes. I guess that would be just getting all the links of the unlinked nodes.

@anvaka anvaka closed this as completed Jan 17, 2015
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