I am using the Raphael library to create SVG objects.
To initialize the SVG form and create a canvas for everything inside, I used the following line, as indicated in the documentation:
var paper = Raphael(10, 50, 320, 200);
Now I want to animate the paper and everything inside, just as I would animate the form that was added to the article in the following manner:
var firstShape = paper.rect(x, y, width, height);
firstShape.animate({x: 100}, 500, "<");
When I try something similar with paper, for example:
paper.animate({x: 100}, 500, "<");
I get an error. ' paper.animate is not a function'
What is going on here and how can I get around it?
source
share