Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove animation from object?

Tags:

raphael

How to remove animation from object in raphael?

var animation  = Raphael.animation({opacity:.2}, 1000);
var circle = paper.circle(0, 0, 5).animate(animation.repeat(Infinity));

I want to perform animation on object until some moment in time. And the question is how to remove/stop animation in that specific moment?

like image 310
fxdxpz Avatar asked Jan 23 '26 23:01

fxdxpz


1 Answers

Well, I really don't know why, but the fiddle works if don't pass any arguments to the stop method. Despite what Raphael's documentation says, I found a working example of an animation stopping in this site (is not the most beatiful site, by the way, but they have an example for each raphael method!)

Here you have the Fiddle working. http://jsfiddle.net/fKxqS/2/

Enjoy!

like image 142
limoragni Avatar answered Jan 26 '26 03:01

limoragni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!