Skip to content

API reference

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

cy.desktopTapThreshold — Core › Interaction controls

Preview · Core › Interaction controls

Read in the complete API reference · All API members

#cy.desktopTapThreshold()

// Css px a mouse/pen press may move and still count as a tap (default 4)
cy.desktopTapThreshold(): number

Css px a mouse/pen press may move and still count as a tap (default 4).

Returns number

the current desktopTapThreshold value

Example

console.log(cy.desktopTapThreshold()); // 4

Example graph and handle setup

#cy.desktopTapThreshold(px)

// Css px a mouse/pen press may move and still count as a tap (default 4)
cy.desktopTapThreshold(px: number): this

Css px a mouse/pen press may move and still count as a tap (default 4).

Parameters
NameDescription
px: number

the new threshold

Returns this

this core, for chaining

Example

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

Example graph and handle setup

Throws

if px is not a finite non-negative number