Skip to content

eles.delayAnimation(duration, complete?)

eles.delayAnimation — Collection > Animation. Cytoscape.js signatures, parameters and return contract.

eles.delayAnimation — Collection › Animation

Preview · Collection › Animation

Read in the complete API reference · All API members

// Like {@link delay}, but returns the handle instead of chaining
eles.delayAnimation(duration: number, complete?: () => void): AnimationHandle

Like delay, but returns the handle instead of chaining.

Parameters
NameDescription
duration: number

the pause in ms

complete: () => void?

called when it elapses

Returns AnimationHandle

the handle; nothing runs until play()

Example

const handle = eles.delayAnimation(1);
await handle.play();
console.log(handle.progress()); // 1

Example graph and handle setup