Calculate the bounding box’s X, Y, Height and Width of a rotated element via JavaScript
I know this is a bit late, but I’ve written a fiddle for exactly this problem, on an HTML5 canvas: http://jsfiddle.net/oscarpalacious/ZdQKg/ I hope somebody finds it useful! I’m actually not calculating your x,y for the upper left corner of the container. It’s calculated as a result of the offset (code from the fiddle example): this.w … Read more