Skip to content

API reference

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

cy.boxSelectionIncludesLabels — Core › Interaction controls

Preview · Core › Interaction controls

Read in the complete API reference · All API members

#cy.boxSelectionIncludesLabels()

// Check whether box selection includes labels
cy.boxSelectionIncludesLabels(): boolean

Whether box selection considers label boxes as well as node bodies (default off). Its sense follows boxSelectionMode: under 'contain' the label box must also be inside the band, under 'overlap' a label that merely crosses the band is enough.

Returns boolean

the current boxSelectionIncludesLabels value

Example

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

Example graph and handle setup

#cy.boxSelectionIncludesLabels(bool)

// Include or exclude labels in box selection
cy.boxSelectionIncludesLabels(bool: boolean): this

Whether box selection considers label boxes as well as node bodies (default off). Its sense follows boxSelectionMode: under 'contain' the label box must also be inside the band, under 'overlap' a label that merely crosses the band is enough.

Parameters
NameDescription
bool: boolean

the setting to apply

Returns this

this core, for chaining

Example

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

Example graph and handle setup