Raphael JS, Path animation
I have a path:
var original_param = 'M '+p1.x+' '+p1.y+'L '+p2.x+' '+p2.y;
var pa开发者_开发知识库th = paper.path(original_param);
I have defined another path attribute for animation:
var animation_param={M: p11.x+' '+p11.y, L: p22.x+' '+p22.y}
where p1
and p2
are points, I do not put their definitions here, since they return the proper values correctly here.
Then I animate the path with the parameters by:
path.animate(animation_param, 1000);
But I got error message
What is the reason of this error?
Did you try use animation_param as string except object? I think it should work.
精彩评论