-
Notifications
You must be signed in to change notification settings - Fork 28
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
Allow custom action on click #31
Comments
Hi, When I click on A, only those nodes are displayed, I see that hover on A when Dim parameter is set does that, I would like this behavior for click on node. Thank you very much, |
Hi PrinceN, This probably should be opened as a separate issue, because if I understand correctly you actually want to do the opposite of what this issue proposes. That is, if you have a graph with A-->B, A-->C, and B-->C, and the user clicks on A, you would like nodes A,B,and C to be shown, but only edges A-->B and A-->C to show and for edge B-->C not to show. If I've understood correctly, you'll want to basically copy the code for the 'dim' hover attribute (possibly modifying it to actually hide using the 'hidden' attribute rather than dim using the color attributes) and adapt it and replace the code in the node select function |
Hello, Thank you for answering so quickly! This is what I would like to do (dim the edges, not hide), I tried many modifications including your suggestions this morning but I am not very talented in JS I must admit. Thank you, |
Can you explain me how can I modify this part of the code to add a condition that would achieve this goal? I tried many modifications but if I understand correctly sigInst.neighbords includes both direct and indirect edges from activeNode (a). if (a == b.source || a == b.target) sigInst.neighbors[a == b.target ? b.source : b.target] = n; |
Continuing this conversation in a new issue specifically on this feature request "New option: Dim edges not directly connected to a clicked node" #48 |
From #28,
"make it so that nodes outside a single node's clicked network remain faded but still visible even when a node is clicked on in order to view the data linked to that node."
Allow on click action to be set:
The text was updated successfully, but these errors were encountered: