width/height after transform

Instead of calculating it yourself, you can get this via the HTMLDOMElement‘s getBoundingClientRect().

This will return an object with the correct height and width, taking into account the transformation matrix.

jsFiddle.

Leave a Comment