[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"><<a \
href="mailto:thomas.deweese@kodak.com">thomas.deweese@kodak.com</a>></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 <<a href="mailto:dao.hodac@gmail.com" \
target="_blank">dao.hodac@gmail.com</a>> wrote on 04/27/2010 05:41:10 AM:<div \
class="im"><br> <br>
> I try to make some elements of my SVG canvas clickable. <br>
> Unfortunately, they are under other elements that are either not <br>
> 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 'pointer-events' attribute
set to 'none'.</font></tt>
<br><div class="im">
<br><tt><font size="2">> I add a listener on my element:</font></tt>
<br><tt><font size="2">> EventTarget control = (EventTarget) \
getCanvas().getSVGDocument<br> > ().getElementById(id);</font></tt>
<br><tt><font size="2">> control.addEventListener("click", new
RemoteClickListener(id, <br>
> getRemoteEngine()), false);</font></tt>
<br><tt><font size="2">> <br>
> but the event is not catched. If I remove the elements that are over<br>
> 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">> 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