forked from cytoscape/cytoscape.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Collection delay
maxkfranz edited this page Apr 24, 2012
·
4 revisions
Add a delay in between one animation and another for all elements in the collection.
Adds a delay before future animations
time : The duration of the delay in milliseconds
function(now) : A callback function called after the delay is done wherenowis the current time
This function is equivalent to running an animation that does nothing for the specified amount of time. Like a regular animation, it will run immediately if the animation queue is empty. Otherwise, it will be put at the end of the animation queue.
Animate to red then blue with a delay in between:
cy.nodes()
.animate({ bypass: { fillColor: "red" } })
.delay( 1000 )
.animate({ bypass: { fillColor: "blue" } });