Reputation: 1
when I try to animate the rotation of an image (with Raphael 2), which I have done before successfully with Raphael 1, nothing happens. Animating another property such as height does work.
this.image.animate({rotation: this.angle + " " + this.centerY + " " + this.centerY}, this.animationTime, '<>');
Do you have an idea? Thanks.
Upvotes: 0
Views: 454
Reputation: 7540
this.image.rotate(45);
I have noticed that the old way has been updated in 2.0.
Upvotes: 0
Reputation: 12943
As I see on http://raphaeljs.com/reference.html element.animate does not have an rotation parameter(at least in version 2.0; maybe in earlier version it was there?).
You have to use
this.image.animate({transform:"r"+this.angle + "," + this.centerY + "," + this.centerY}, this.animationTime);
Upvotes: 2