o ... i have some mess up after viewing the raphael doc
c.node is html element but not extended by prototype
please use $(c.node) to make it extended by prototype

On Dec 17, 8:07 pm, code1n <lomov...@gmail.com> wrote:
> hello everyone.
> i'm trying to use raphael svg graphic library with prototype
> there is a question wich is troubeling me - how to extend svg elements
> with prototype?
> For example, i use this code:
> r = Raphael($("container"), 300, 300);
> c = r.circle(100, 100, 50);
> c.attr('fill', 'red');
> c.node.toggleClassName("half_opacity")
> this doesn't works because c.node.toggleClassName("half_opacity")
> enteres enteres to  toggleClassName(element, className) function with
> first argument "half_opacity" and undefied second element. it has same
> effect as i've been calling Element.toggleClassName("asd").
> c.node.toString() returns [object SVGCircleElement]. SVGCircleElement
> inherits SVGElement, wich has Element as "Superinterface".
> I tried Object.extend(c.node, Element), but it doesn't make sence.
> I liked to use Raphael in my work, using it with Prototype will brings
> more facilities.
> One more question - is there any svg library wich supports prototype?


You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to