W3C home > Mailing lists > Public > www-style@w3.org > December 2011

Re: [cssom-view] Correction and clarification for the coordinate systems of getClientRect/getBoundingClientRect

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 1 Dec 2011 23:55:26 +1300
Message-ID: <CAOp6jLaGaWydHGZ=W35-Xo7pmHcTF_rMi8ydBENoUs_Ku+SDug@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: www-style <www-style@w3.org>
On Thu, Dec 1, 2011 at 5:37 PM, Rik Cabanier <cabanier@gmail.com> wrote:

> It seems like you shouldn't take the transform into account since the
> axis-aligned box will be too big.
> ie if you were to use the getClientRects API for hit detection and you
> have 2 neighboring and skewed or rotated elements, their boxes will overlap.

You shouldn't use getClientRects for hit detection. But if getClientRects
doesn't take transforms into account, it's even more useless for hit

"If we claim to be without sin, we deceive ourselves and the truth is not
in us. If we confess our sins, he is faithful and just and will forgive us
our sins and purify us from all unrighteousness. If we claim we have not
sinned, we make him out to be a liar and his word is not in us." [1 John
Received on Thursday, 1 December 2011 10:56:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:08 UTC