Derfder
Derfder

Reputation: 3324

Pause before starting animation of drawing a path in Raphael JS

I have this working code for animating drawing a line in Raphael JS:

var path1 = paper.path("M2 2").attr({"stroke": "#fff", "stroke-width":1});
// Here I need to wait 5 seconds
path1.animate({path: "M2 2L100 2"},1500);

In my previous question about waiting a certain time before executing a code, one guy suggested me this solution for a delay before starting a fadein animation of a rectangle:

http://jsfiddle.net/beajL/

, but with path I am not able to apply the same principle.

Any help would be appreciated.

Upvotes: 2

Views: 1179

Answers (1)

Mics
Mics

Reputation: 1430

Here's that guy again. That method still works as well as rectangle.

http://jsfiddle.net/48ZDc/

I noticed that the color of path is white; guess that's the problem.

Upvotes: 4

Related Questions