Skip to content

ele.isParent()

eles.isParent — Collection > Compound nodes. Cytoscape.js signatures, parameters and return contract.

eles.isParent — Collection › Compound nodes

Preview · Collection › Compound nodes

Read in the complete API reference · All API members

// Whether the first element is a node with at least one child
ele.isParent(): boolean

Whether the first element is a node with at least one child.

Returns boolean

true for a parent node; false for edges and for removed elements, which are nodes of no hierarchy

Example

console.log(eles.isParent()); // false

Example graph and handle setup