Skip to content

ani.stop(jumpToEnd?)

ani.stop — Animations > Animation handle. Cytoscape.js signatures, parameters and return contract.

ani.stop — Animations › Animation handle

Preview · Animations › Animation handle

Read in the complete API reference · All API members

// Stop in place, or at the targets with jumpToEnd — the whole animation, whatever elements it spans
ani.stop(jumpToEnd?: boolean): void

Stop in place, or at the targets with jumpToEnd — the whole animation, whatever elements it spans. Through the manager, so a GPU-driven one releases its batch.

Parameters
NameDescription
jumpToEnd: boolean?Default: false

apply the final values instead of freezing

Returns void

Example

ani.play();
ani.stop(true);
console.log(ani.playing()); // false

Example graph and handle setup