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

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.


Received on Wednesday, 6 October 2010 22:02:35 UTC