I am trying to animate a triangle (I think the needle is an angular sensor) so that it rotates at a given point (see red dot).
var svg = Raphael("container",400,400), triangle = svg.path("M210 200L190 200L200 100Z").attr({fill:"#000"}), circle = svg.circle(200,200,5).attr({fill:"#f00"});
JSFiddle example
I can rotate (without animation) along this center in order:
// to rotate with center point 200,200, works fine triangle.rotate(80,200,200);
But I canβt understand for life how to revive the rotation so that it revolves around this point. It seems to rotate in the middle of the path.
Any help?
brad
source share