Open computermacgyver opened 11 years ago
Hi, First of all thank you very much for this awesome work. I use it very often. I would like to have some help with this issue : Let's say A is link to C and to B which is linked to C
When I click on A, only those nodes are displayed, How can I hide the connections between B and C in this case?
I see that hover on A when Dim parameter is set does that, I would like this behavior for click on node. Can you tell me which line of main.js should be added?
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. I have difficulties in modifying 'sigInst.iterEdges(function (b)' from the code of 'fontion (e)' for the 'dim hover'. I tried to change the attributes to make them work together but this where I lack the knowledge to do this. Could you please help me once more with this?
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: