Div Resize based on the opposite corner handle
<p>I have doubt in Javascript. Please read the below details.</p>

<p>In HTML page, I have a DIV tag with an image. The DIV tag is rotated in 60 Degree using CSS transform. Now the DIV and Image rotated in 60 Degree. The Div tag also contain the resize feature. I have used twinhelix resize script.</p>

<p>Before the rotate I can resize the DIV tag based on the opposite corner handle.</p>

<p>I have tracked the four corner points X,Y positions of the DIV tag in before and after rotations.
Now I have the below values,</p>

<p>Div tag Width, Height,
Before rotate Top Left X Pos, Y Pos
Before rotate Top Right X Pos, Y Pos
Before rotate Bottom Left X Pos, Y Pos
Before rotate Bottom Right X Pos, Y Pos</p>

<p>After rotate Top Left X Pos, Y Pos
After rotate Top Right X Pos, Y Pos
After rotate Bottom Left X Pos, Y Pos
After rotate Bottom Right X Pos, Y Pos</p>

<p>Degree</p>

<p>Bounding box Width &amp; Height
Bounding box Top Left X Pos, Y Pos</p>

<p>My problem is after the rotate I can resize the DIV tag but it does not work properly.</p>

<p>How can I resize the DIV tag based on the opposite corner handle while the DIV tag in rotation.</p>

<p>My Reference Website: </p>

<p>This site was implemented this resize &amp; rotate feature. But I could not track the logic. They used some maths formula.</p>

<p><a href="http://www.polyvore.com/" rel="nofollow">http://www.polyvore.com/</a> is our reference website. We are creating one website like polyvore.com. This website merge many
clothes into one image.</p>

<p>You can follow the below steps for see the DIV rotation and resize.</p>

<p>open the link <a href="http://www.polyvore.com/cgi/app" rel="nofollow">http://www.polyvore.com/cgi/app</a></p>

<p>Now you can drag and drop the clothes from right side panel into left side canvas container.</p>

<p>Now the selected cloth in the canvas container. Here you can see 4 resize corner points and one rotate point.</p>

<p>You can rotate this DIV using that rotate point.</p>

<p>You can resize this DIV using 4 corner points.</p>

<p>I tried last one week for finding the solution for this problem.</p>

<p>Please share your suggestions here.</p>
