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.
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.
您将需要所谓的“屏幕外画布”,这是目前在 html5 中未实现的东西(有些人谈论它)。
也许您可以创建一个画布并将 css 设置为display: none
or visibility: hidden
,然后将图像数据从一个画布复制到另一个画布。
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