// Remove elements from the graph
cy.remove<Data>(eles: Collection<NodeData, EdgeData, Data>): Collection<NodeData, EdgeData, Data>Remove elements from the graph. Removing a node removes its connected edges, and removing a compound parent removes its descendants. Equivalent to eles.remove().
| Name | Description |
|---|---|
eles: Collection<NodeData, EdgeData, Data> | the elements to remove |
Returns
Collection<NodeData, EdgeData, Data>the removed elements
Example
cy.remove(cy.getElementById('c'));console.log(cy.hasElementWithId('c')); // false