W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

RE: ISSUE: clientX and clientY coordinates in DOM MouseEvents

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Fri, 11 Jan 2002 10:30:11 -0700
Message-ID: <70E215722F6AD511820A000103D141D40AA724@thor.aeathtl.com>
To: "'www-dom@w3.org'" <www-dom@w3.org>
Cc: "'tkormann@ilog.fr'" <tkormann@ilog.fr>, "'www-svg@w3.org'" <www-svg@w3.org>
Thierry wrote:

> The SVG specification has changed this definition and the 
> clientX and clientY attributes represents viewport 
> coordinates for the coresponding svg element.

Could you provide a specific reference for that "change".  I don't recall
and couldn't find anything in the SVG 1.0 recommendation (and haven't
checked in the 1.1 drafts).  The SVG 1.0 drafts seem to link directly to the
DOM 2 Events specs for the definitions of MouseEvent.

From my experience with SVG (specifically the Adobe SVG Viewer), I had to
jump through hoops to get the coordinates from user agent coordinates back
into the coordinate space of the svg element.

If it is not there already, a better option that A or B is adding a method
to SVGElement that can take a user agent coordinate and return an SVGPoint
in that coordinate space.

function onmouseover(e)
{
   var pointhere = e.target.ConvertClient(e.clientX,e.clientY);
}
Received on Friday, 11 January 2002 12:57:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:55 GMT