Skip to content

ele.locked()

eles.locked — Collection > Grab, lock and pannability. Cytoscape.js signatures, parameters and return contract.

eles.locked — Collection › Grab, lock and pannability

Preview · Collection › Grab, lock and pannability

Read in the complete API reference · All API members

// Whether the first element is locked — immovable, by layouts, position writes and position tweens alike (one rule every layout holds a locked node where it is and keeps it in the layout's structure; force treats it as an obstacle its settle separates the others from)
ele.locked(): boolean

Whether the first element is locked — immovable, by layouts, position writes and position tweens alike (one rule every layout holds a locked node where it is and keeps it in the layout's structure; force treats it as an obstacle its settle separates the others from). A locked child stays where it is when its compound parent is positioned, shifted or dragged — its own subtree with it — and the parent re-derives about the stayers and the movers. True for every node while cy.autolock( true) is set; the flag column alone is what { locked: true } filters read.

Returns boolean

true when locked

Example

console.log(eles.locked()); // false

Example graph and handle setup