[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    Re: event targets
From:       dao <dao.hodac () gmail ! com>
Date:       2010-04-28 6:01:16
Message-ID: y2z272595f41004272301q184bbca4zdefb6a8d1ef23ffb () mail ! gmail ! com
[Download RAW message or body]

great, it works fine.

On Tue, Apr 27, 2010 at 12:05 PM, <thomas.deweese@kodak.com> wrote:

> Hi Hodac,
>
> dao <dao.hodac@gmail.com> wrote on 04/27/2010 05:41:10 AM:
>
>
> > I try to make some elements of my SVG canvas clickable.
> > Unfortunately, they are under other elements that are either not
> > visible or semi transparent (they belong to other layers).
>
>
>    Any elements (or groups/layers) that you do not want to receive
> events should have the 'pointer-events' attribute set to 'none'.
>
> > I add a listener on my element:
> > EventTarget control = (EventTarget) getCanvas().getSVGDocument
> > ().getElementById(id);
> > control.addEventListener("click", new RemoteClickListener(id,
> > getRemoteEngine()), false);
> >
> > but the event is not catched. If I remove the elements that are over
> > the target element, it works.
>
>    Setting pointer-events to none is effectively the same as
> removing the elements for the purposes of delivering events.
>
> > and can I have more information about the useCapture boolean?
>
>         http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow
>
>


-- 
Dao Hodac

[Attachment #3 (text/html)]

great, it works fine.<br><br><div class="gmail_quote">On Tue, Apr 27, 2010 at 12:05 \
PM,  <span dir="ltr">&lt;<a \
href="mailto:thomas.deweese@kodak.com">thomas.deweese@kodak.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> <font size="2" face="sans-serif">Hi Hodac,</font>
<br>
<br><tt><font size="2">dao &lt;<a href="mailto:dao.hodac@gmail.com" \
target="_blank">dao.hodac@gmail.com</a>&gt; wrote on 04/27/2010 05:41:10 AM:<div \
class="im"><br> <br>
&gt; I try to make some elements of my SVG canvas clickable. <br>
&gt; Unfortunately, they are under other elements that are either not <br>
&gt; visible or semi transparent (they belong to other layers).</div></font></tt>
<br>
<br><tt><font size="2">   Any elements (or groups/layers) that
you do not want to receive </font></tt>
<br><tt><font size="2">events should have the &#39;pointer-events&#39; attribute
set to &#39;none&#39;.</font></tt>
<br><div class="im">
<br><tt><font size="2">&gt; I add a listener on my element:</font></tt>
<br><tt><font size="2">&gt; EventTarget control = (EventTarget) \
getCanvas().getSVGDocument<br> &gt; ().getElementById(id);</font></tt>
<br><tt><font size="2">&gt; control.addEventListener(&quot;click&quot;, new
RemoteClickListener(id, <br>
&gt; getRemoteEngine()), false);</font></tt>
<br><tt><font size="2">&gt; <br>
&gt; but the event is not catched. If I remove the elements that are over<br>
&gt; the target element, it works.</font></tt>
<br>
<br></div><tt><font size="2">   Setting pointer-events to none is effectively
the same as </font></tt>
<br><tt><font size="2">removing the elements for the purposes of delivering
events.</font></tt>
<br><div class="im">
<br><tt><font size="2">&gt; and can I have more information about the useCapture
boolean?</font></tt>
<br>
<br></div><tt><font size="2">        </font></tt><a \
href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow" \
target="_blank"><tt><font \
size="2">http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow</font></tt></a>
 <br><font size="2" face="sans-serif"><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Dao Hodac<br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic