Skip to content

ele.selected()

eles.selected — Collection > Selection. Cytoscape.js signatures, parameters and return contract.

eles.selected — Collection › Selection

Preview · Collection › Selection

Read in the complete API reference · All API members

// Whether the first element is selected
ele.selected(): boolean

Whether the first element is selected.

Returns boolean

true when selected

Example

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

Example graph and handle setup