Skip to content

ele.isOrphan()

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

eles.isOrphan — Collection › Compound nodes

Preview · Collection › Compound nodes

Read in the complete API reference · All API members

// Whether the first element is a node without a parent
ele.isOrphan(): boolean

Whether the first element is a node without a parent.

Returns boolean

true for a node with no parent; false for edges, so it is not the plain negation of isChild()

Example

console.log(eles.isOrphan()); // true

Example graph and handle setup