Selecting children/siblings/ancestors/descendants of a specific node #3080
rob-gordon
started this conversation in
General
Replies: 1 comment 1 reply
-
Topology is too expensive to be pragmatic for selectors. Cytoscape has a number of functions related to traversal that you can use: https://js.cytoscape.org/#collection/traversing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone know if it is possible to use cytoscape selectors to select nodes which are children, siblings, ancestors, or descendants of a particular node?
Example 1
A selector which selects all nodes which are one edge away from a given node

An example selector,

#a:sibling { background-color: yellow; }
Example 2
A selector which selects all the descendants of a node in a directed acyclic graph

An example selector,

#d:descendants { background-color: yellow; }
I realize these could be expensive to compute and probably ambiguous in some contexts (I'm not a graph theory expert), but does anyone know if there has been an attempt to support selectors like these that I could try it out? Alternatively, is this functionality that could be added via a plugin?
Thanks for any advice or thoughts.
Beta Was this translation helpful? Give feedback.
All reactions