Skip to content

ele.grabbable()

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

eles.grabbable — Collection › Grab, lock and pannability

Preview · Collection › Grab, lock and pannability

Read in the complete API reference · All API members

// Pannable elements are not draggable, so pannable overrides grabbable
ele.grabbable(): boolean

Pannable elements are not draggable, so pannable overrides grabbable .

Returns boolean

whether a drag gesture would move this element — the effective answer, so a grabbable-but-pannable element reads false here while json() reports the raw field

Example

console.log(eles.grabbable()); // true

Example graph and handle setup