How can I measure the width and height of a rotated element on Javascript?

Viewed 592

There is a bug with my design interface where the width and height of my selected div are false when rotated.

Here's a schema of what I have and another one of what I want.

enter image description here

I want to find the formula using Javascript, how can I possibly write it ?

PS : I already have the angle, the width and the height of the first schema, no need to calculate it again.

2 Answers
Related