Skip to content

API reference

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

cy.touchTapThreshold — Core › Interaction controls

Preview · Core › Interaction controls

Read in the complete API reference · All API members

#cy.touchTapThreshold()

// Css px a touch press may move and still count as a tap (default 8)
cy.touchTapThreshold(): number

Css px a touch press may move and still count as a tap (default 8).

Returns number

the current touchTapThreshold value

Example

console.log(cy.touchTapThreshold()); // 8

Example graph and handle setup

#cy.touchTapThreshold(px)

// Css px a touch press may move and still count as a tap (default 8)
cy.touchTapThreshold(px: number): this

Css px a touch press may move and still count as a tap (default 8).

Parameters
NameDescription
px: number

the new threshold

Returns this

this core, for chaining

Example

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

Example graph and handle setup

Throws

if px is not a finite non-negative number