Chain path commands in raphael.js
I would like to know, is there a way to build on the same path raphael.js?开发者_如何学编程
I mean, i wont for example build a path using a for() cycle. I thought the the variable returned path = paper.path(...) could be used to increase the path using c.path(). But this throw an error since the method path() doesn't exist...
The only solution i found now is to build a string and then pass it in one time to paper.path()
Is there a more elegant solution?
You can apply the attribute 'path' to update a path.
initialPath="M......."
;
path=paper.path(initialPath);
initialPath=initialPath+" 50 200";
path.attr({path:initialPath});
精彩评论