You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 normally, while edge B-->C would be 'dimmed'
The text was updated successfully, but these errors were encountered:
Thank you for creating a specific issue. It is important in my instance because it will be easier to understand the connections from and to the active node without the links between the 'non-active' nodes.
I tried 2 things :
Add a for loop to this line to distinguish direct and undirect edges.
Adapt the code here and replace it in function nodeActive(a) as you mentionned in issue 31.
I was unable to get something working in both possibilities. I would like to know which approach is the best?
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;
@Princen I'm not sure what you mean by 'direct' and 'indirect' edges. The code at that point is looping over all edges and building up sigInst.neighbors, which is a list of all the nodes that have an edge with the activeNode (a).
That line could be rewritten more verbosely (but probably clearer) as:
if (a==b.source) {
sigInst.neighbors[b.target]=n;
} else if (a==b.target) {
sigInst.neighbors[b.source]=n;
}
Changing this requires a bit of a rewrite. A list of the edges will need to be kept in addition to the notes and used to determine the dim/not dim status when the edges are redisplayed. The code that undoes this when a node is deselected will also have to be rewritten I suspect. I don't have time to write this at the moment but should hopefully be able to look at in later in the month.
Requested by @Princen in #31
The text was updated successfully, but these errors were encountered: