Skip to content

API reference

cy.autoungrabify — Core > Interaction controls. Cytoscape.js signatures, parameters and return contract.

cy.autoungrabify — Core › Interaction controls

Preview · Core › Interaction controls

Read in the complete API reference · All API members

#cy.autoungrabify()

// Read whether every node is ungrabbable regardless of its own grabbable flag
cy.autoungrabify(): boolean

Read whether every node is ungrabbable regardless of its own grabbable flag. Unlike autolock(), this blocks only user dragging; programmatic position writes still apply.

Returns boolean

the current autoungrabify value

Example

console.log(cy.autoungrabify()); // false

Example graph and handle setup

#cy.autoungrabify(bool)

// Set whether every node is ungrabbable regardless of its own grabbable flag
cy.autoungrabify(bool: boolean): this

Set whether every node is ungrabbable regardless of its own grabbable flag. Unlike autolock(), this blocks only user dragging; programmatic position writes still apply.

Parameters
NameDescription
bool: boolean

the new setting

Returns this

this core, for chaining

Example

const result = cy.autoungrabify(false);
console.log(result === cy); // true

Example graph and handle setup

Also spelled cy.autoungrabifyNodes.