On Feb 8, 2011, at 7:38 pm, Charles Pritchard wrote:
>
> On this same point -- did the event.mouseCoords() style proposal get any further?
> This is on topic, though it's at the other end of the spectrum.
>
> When CSS 2D transforms get thrown in the mix, matching the mouse coordinates to the
> coordinates stored in a scripting environment gets pretty tricky. I've had to add two layers onto every
> piece of UI that I do. It'd be nice to route it through a function if it exists, and return early, and let
> the UA handle the transformation chain.
>
> [body onload="scrollTo(... somewhere...)"]
> [canvas style="transform: scale(2,2); padding-top: 2em; margin-top: 2em;"][/canvas]
I started to add some API to <http://dev.w3.org/Graphics-FX/modules/2D-transforms/spec/2DTransforms.html#sec-transform-lists-nested-transformations>, but we need to figure out how the coordinate system should work for inline elements (which may be split over multiple lines). We may have to return coords in the context of a containing block sometimes, which will complicate the API.
Simon