Skip to content

API reference

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

cy.boxSelectionEnabled — Core › Interaction controls

Preview · Core › Interaction controls

Read in the complete API reference · All API members

#cy.boxSelectionEnabled()

// Check whether box selection is enabled
cy.boxSelectionEnabled(): boolean

Read whether the box-selection gesture is available.

Returns boolean

the current boxSelectionEnabled value

Example

console.log(cy.boxSelectionEnabled()); // true

Example graph and handle setup

#cy.boxSelectionEnabled(bool)

// Enable or disable box selection
cy.boxSelectionEnabled(bool: boolean): this

Set whether the box-selection gesture is available.

Parameters
NameDescription
bool: boolean

the new setting

Returns this

this core, for chaining

Example

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

Example graph and handle setup