W3C home > Mailing lists > Public > www-svg@w3.org > February 2002

lack of a convert SVGElement.convertClientXY() or equivalent

From: Curt Arnold <carnold@houston.rr.com>
Date: Fri, 15 Feb 2002 13:45:26 -0600
Message-ID: <002301c1b659$50915190$a800a8c0@CurtMicron>
To: <www-svg@w3.org>
Cc: <www-svg-comments@w3.org>
There was a fairly confusing thread last month (http://lists.w3.org/Archives/Public/www-svg/2002Jan/0018.html) about the client coordinates reported by MouseEvent's, particularly for hybrid XHTML/SVG documents.

A quick review of the corresponding sections in the SVG 1.1 Last Call indicates that one half of what I consider a solution to the problem was addressed in the draft.  clientX and clientY coordinates are now expressed in terms of the DOM implementation's client space, instead of having a different coordinate space for events over SVG elements and those over XHTML elements.

However, the other half of the solution, a standard reliable mechanism for converting client coordinates into user units, did not appear to be addressed.  My suggestion was something like adding:

interface SVGElement {
    SVGPoint convertClientXY(float clientX, float clientY)
}

which would return you the equivalent point in the user coordinate space (before any transforms introduced on the element).  Such a method would be immediately useful for existing SVG script authors since doing that transformation currently requires knowing way too much about the rendering enviroment and constraining the document so that client area has fixed dimensions.  Attempting to do the conversion without assistance from the implementation for a hybrid XHTML and SVG document would appear to be intractable.
Received on Friday, 15 February 2002 14:45:40 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:21 GMT