Skip to content
maxkfranz edited this page Mar 2, 2012 · 3 revisions

eles.remove()

Remove the elements from the graph.

eles.remove()

Removes the elements from the graph

Details

This function removes elements from the graph. You can still access these elements through references to them in memory, but some functions will not work. For example, eles.neighborhood() will not work, since eles is not in the graph, and so, has no neighborhood.

See eles.restore() for putting elements back in the graph after they have been removed.

Examples

var removed = cy.nodes("[weight > 50]").remove();
// can still access removed nodes via `removed` variable

Clone this wiki locally