Re: [svg-developers] Retrieving xy coord
- You can't get events off of arbitrary open space. You have to have some
graphic object underneath wherever you have the event.
Here is a simple example of how you can simulate grabbing events over open
space by putting a rectangle which is neither filled nor stroked (thus, it
is invisible) that covers the entire canvas:
<rect x="0%" y="0%" width="100%" height="100%" pointer-events="all"
fill="none" stroke="none" onclick="alert('hi')"/>
Note the pointer-events="all". The 'pointer-events' property controls when
an object can receive events. The value 'all' says that the object receives
events even when it isn't drawn. For more on pointer events, see
At 02:24 AM 2/1/01 +0000, adean007@... wrote:
>I know you can retrieve the xy coord. from the svg viewer coordinate
>system (clientx or screenx etc.), but how can you retrieve an xy
>coord from the svg doc coordinate system when selecting empty space
>(not an svg element).
>Any help would be greatly appreciated!