- From: Andreas Neumann <a.neumann@carto.net>
- Date: Fri, 6 Nov 2009 14:56:50 +0100 (CET)
- To: "Ryan Maw" <RMaw@Forge-Industrial.com>
- Cc: www-svg@w3.org
Hi, I have no solution other than what Jeff suggested with SVGSVGElement.getIntersectionList() But I do also have use-cases besides Ryans use case for an enhanced pointer-events handling that allows pointer-events to travel through to all overlapping graphics elements below the mouse-cursor position. In GIS it is very common having to penetrate through all map layers (potentially many of them overlapping). As Ryan said, these are not parent/child/grandchild, etc. relationships but purely spatial or geometric relationships. So having an improved pointer-events attribute like "spy" "catch-and-release" or "penetrate" or whatever it is called, would be very beneficial for GIS and other applications. This is something I would be very glad if the SVG WG could pick it up for a later addition to the SVG spec. Andreas On Thu, November 5, 2009 9:27 pm, Ryan Maw wrote: > Hello, it's my understanding that this is the email address I should > write to with a suggestion for an enhancement to the pointer-events spec > in SVG. Please redirect if this is not the case. > > > > I am working on a SVG application that uses translucent rectangles. > Clicking or hovering with the mouse pointer over a rectangle fires an > event related to the specific rectangle. In many circumstances one > rectangle is partially or completely overlapping another but because > they are translucent the rectangle in the back can still be seen through > the one in the front. In this situation it is quite intuitive for a user > to click on the overlapping region and expect the events associated with > both rectangles to be triggered. Indeed, this is the desired behaviour I > want to program for. > > The current pointer-events spec allows me to turn off the event capture > on the upper rectangle by setting pointer-events="none" on this > rectangle. This way the bottom rectangle receives the events. If I don't > do this, then only the top rectangle gets the events. I desire BOTH > rectangles to get the events but there seems to be no simple way to > achieve this. I imagine setting the upper rectangle to something like: > > pointer-events="spy" > > This would allow the top rectangle to catch events but then immediately > release them to propagate to a rectangle beneath - the upper rectangle > would be "spying" on events. I'm guessing this type of > translucent-overlapping situation wasn't considered when the > pointer-events spec was written. Adding a "spy" or "catch-and-release" > type of behaviour would be valuable. Thank you for considering it. > > Ryan Maw, P.Eng. > > > -- Andreas Neumann http://www.carto.net/neumann/ http://www.svgopen.org/
Received on Friday, 6 November 2009 13:57:43 UTC