views:

35

answers:

0

Does anyone know how to get the displayed top left hand corner of a rotated box after using a rotation with webkit-transform?

So, for example, I draw a box ask for the top left corner, rotate the box 270 degrees for example, then how to I query for the position of the "new" top left corner, which in this case is effectively the original bottom right corner ...

I've tried using jQuery to check the offset().top and offset().left but it seems jQuery is clever enough to know that the container is rotated, and I get back the original top left hand corner which I don't want in this case.

I guess I could track the rotations and then always ask for the correct offsets, but I think it would be a little more robust if this was possible.

Thanks for your help!