Skip to content

cy.stop(jumpToEnd?)

cy.stop — Core > Animation. Cytoscape.js signatures, parameters and return contract.

cy.stop — Core › Animation

Preview · Core › Animation

Read in the complete API reference · All API members

// Stop every running viewport animation (animations have no queue)
cy.stop(jumpToEnd?: boolean): this

Stop every running viewport animation (animations have no queue).

Parameters
NameDescription
jumpToEnd: boolean?Default: false

apply each animation's final values instead of freezing the viewport where the tween reached

Returns this

this core, for chaining

Example

cy.animate({ pan: { x: 20, y: 10 }, duration: 100 });
cy.stop(true);
console.log(cy.animated()); // false

Example graph and handle setup