开发者

Chain path commands in raphael.js

开发者 https://www.devze.com 2023-03-13 09:30 出处:网络
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 = pap

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});
0

精彩评论

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