Re: No "pointer-events" property to make svg tag trigger events.

Hi Kevin,

You can put events on the <svg/> root element, but they will only fire 
if a geometry is present at the pointers location. You need to create an 
"invisible" rectangle in the file, but you don't have to put the event 
handlers on the rectangle - you can attach them to the <svg /> element.

Andreas

On 12/16/10 1:07 AM, Kevin Ar18 wrote:
> As far as I know, SVG does not have a way to force an svg container to 
> trigger pointer-events.
>
> I thought the "boundingBox" property would do this, but it seems that 
> is controlled by graphical elements within the svg and not the actual 
> dimensions of the svg tag itself.  Is this correct?
>
> If so, are there any plans to add a way to allow the svg tag to 
> trigger events?
>
>
> There are two specific instances where this is sort of a problem:
> 1. Within an svg document, if I want to specify a "canvas area" that I 
> can interact with.  I realize I can use a rect or some other graphical 
> object to do this; however, sometimes this adds much more complexity 
> to the javascript "app" as I have to work around the DOM in certain ways.
> 2. This could affect the svg-in-html/css question.

Received on Thursday, 16 December 2010 20:26:16 UTC