Annabelle
Annabelle

Reputation: 754

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.

Upvotes: 0

Views: 58

Answers (1)

methodofaction
methodofaction

Reputation: 72385

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.

Upvotes: 2

Related Questions