Skip to content

ani.promise()

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

ani.promise — Animations › Animation handle

Preview · Animations › Animation handle

Read in the complete API reference · All API members

// The completion promise
ani.promise(): Promise<void>

The completion promise.

Returns Promise<void>

resolves when the animation completes (or is stopped)

Example

ani.play();
await ani.promise();
console.log(ani.progress()); // 1

Example graph and handle setup