Annabelle Annabelle - 1 year ago 180
Javascript Question

Raphael transparent element onclick

How can I make a fill of the transparent element in Raphael clickable? After specifying fill:"none" for an element (e.g. rect) only a frame is clickable. I need to put fill:"none" in order to make other elements from previous layers visible.

Answer Source

In SVG you would normally use pointer-events, but Raphael does not support them (as there's no equivalent in VML). The way to accomplish clickable transparent fills in Raphael is to specify a fill with zero transparency with a transparent fill, i.e. fill: "rgba(0,0,0,0) or specify any fill and then fill-transparency: 0.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download