forked from cytoscape/cytoscape.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Collection lock
maxkfranz edited this page Nov 30, 2011
·
1 revision
Lock the nodes in place so they can not be moved.
Locks the nodes
A node that is locked can not be grabbed by the user to be moved, nor can a locked node be moved programmatically or by running a layout.
To make a graph that is static, you can lock all nodes as they are added:
cy.add( someArrayOfNodes );
cy.nodes().lock();Alternatively, you could use the locked initialisation field in the element object.
cy.nodes().lock(); // lock all nodes