开发者

RaphaelJS target position

How can I access the target position of a raphael circle? That is, the position that it will be in when it has finished an animation?

Better yet, I want 2 circles and a line connecting them, then I want to move a ci开发者_运维问答rcle and have the path follow. What is a better way to achieve this?

Related links:

http://raphaeljs.com/reference.html

Raphael js, how to get a circle's center x, y position?

Thanks.


There is the third argument in the animation call which is the the "call back function" which should contain the cicle.attr("cx") and cicle.attr("cy") which is the finished position of the circle after the animation.

Also it sounds like you might be looking for animateAlong() for the second part of your question.

Charles http://www.irunmywebsite.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜