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

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

From: Jonathan Watt <jwatt@jwatt.org>
Date: Wed, 06 Oct 2010 23:02:27 +0100
Message-ID: <4CACF1F3.9090601@jwatt.org>
To: Jonas Sicking <jonas@sicking.cc>
CC: www-dom@w3.org
On 06/10/2010 05:29, Jonas Sicking wrote:
> This would this also take account for things like parent plain HTML
> elements being scrolled and things like that right?

Yes. It wouldn't be much use if it didn't.

> What happens if you pass in an element which the mouse isn't actually
> over? Would it be possible to transform the coordinates to that
> elements coordinate space anyway?

Yes. I don't see any reason why the pointer should be over the specified
element. The function just transforms the pointer's x/y by the transform from
the pointer event's coordinate system (the window coordinate system) to the
specified element's coordinate system. It's just a transform after all.

Jonathan
Received on Wednesday, 6 October 2010 22:02:35 GMT

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