Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.size() ignores scaled elements #14

Open
itsrachelfish opened this issue Jun 18, 2015 · 0 comments
Open

.size() ignores scaled elements #14

itsrachelfish opened this issue Jun 18, 2015 · 0 comments
Labels

Comments

@itsrachelfish
Copy link
Member

.size() only calculates the original size of an element, ignoring any css transforms like rotation or scaling. Unfortunately the result returned by .getBoundingClientRect() varies considerably. For example it works fine for scaled elements on their own, but rotated elements will give a box containing the entire area they cover.

It might be necessary to detect CSS scaling and use that to modify the calculated output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant