Loading ...
Sorry, an error occurred while loading the content.
 

Retrieving xy coord

Expand Messages
  • adean007@hotmail.com
    Hi 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
    Message 1 of 2 , Jan 31, 2001
      Hi

      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!


      Andy Dean
      adean007@...
    • Jon Ferraiolo
      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
      Message 2 of 2 , Jan 31, 2001
        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:

        <svg>
        <rect x="0%" y="0%" width="100%" height="100%" pointer-events="all"
        fill="none" stroke="none" onclick="alert('hi')"/>
        </svg>

        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
        http://www.w3.org/TR/SVG/interact.html#PointerEventsProperty.

        Jon Ferraiolo
        SVG Editor
        jferraio@...

        At 02:24 AM 2/1/01 +0000, adean007@... wrote:
        >Hi
        >
        >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!
        >
        >
        >Andy Dean
        >adean007@...
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.