W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2010

Re: [DOM Level 3 Events] MouseEvent.getCoordsAt(element)

From: Jacob Rossi <jrossi@microsoft.com>
Date: Tue, 5 Oct 2010 20:04:28 +0000
To: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <D0BC8E77E79D9846B61A2432D1BA4EAEC51B9D@TK5EX14MBXC110.redmond.corp.microsoft.com>
> Proposal:
>
> To make life easier for authors I'd like to propose the addition of a
> 'getCoordsAt' method to the MouseEvent interface. This method would be passed
> the element at which the local coordinates of the event are required, and return
> an object implementing the SVGPoint interface[1] (or a new interface
> implementing 'x' and 'y' properties).
>
> I've uploaded a JavaScript implemented demo of this method here:
>
>    http://jwatt.org/svg/tmp/mouse-relative-positioning.svg

I understand the relevance of this feature. I've had to implement such a function before for some personal projects. The transforms can get nasty.

However, seeing as you have demonstrated a simple workaround and D3Events is in Last Call, I think this might better be suited for a future spec--especially if it might better be implemented as an API for more than just SVG elements. Thoughts?

Jacob Rossi
Program Manager
Internet Explorer
Received on Tuesday, 5 October 2010 20:44:10 GMT

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