使用cytoscape.js在复合节点中选择叶节点

时间:2014-06-18 11:24:07

标签: javascript cytoscape.js cytoscape cytoscape-web

我有几个复合节点(A包含B,B包含C),我想选择叶节点(C)。怎么做?

谢谢!

1 个答案:

答案 0 :(得分:0)

您选择的含义不明确,但我猜你的意思是如何查询图表:

cy.nodes().not(':parent'); // all nodes who are not themselves a parent
// or //
cy.nodes(':child').not(':parent'); // all descendant nodes who are not themselves a parent
相关问题