开发者

Creating object in RaphaelJS

开发者 https://www.devze.com 2022-12-21 20:25 出处:网络
Is it possible to create Raphael\'s object but not drawing it on paper? In example,开发者_运维问答 i want to create circle, do some actions and show it on callback of actions.You would need what is c

Is it possible to create Raphael's object but not drawing it on paper?

In example,开发者_运维问答 i want to create circle, do some actions and show it on callback of actions.


You would need what is called an "offscreen canvas", something that is currently not implemented in html5 (some people talk about it).

Maybe you can create a canvas and set the css to display: none or visibility: hidden, and copy the image data from one canvas to the other.


You can use this construct:

var foo = circle(whatever).hide();

and then later use foo.show();

inside whichever callback. it creates the circle object (you can see it in the dom) but you won't see it on the raphael paper

0

精彩评论

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

关注公众号