forked from cytoscape/cytoscape.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Collection remove
maxkfranz edited this page Mar 2, 2012
·
3 revisions
Remove the elements from the graph.
Removes the elements from the graph
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.
var removed = cy.nodes("[weight > 50]").remove();
// can still access removed nodes via `removed` variable