Punam,

Are you saying that a and b above are not yet fixed?  What I suggest (and I thought I'd left this as a comment somewhere) is that you modify the generateNewPreview() method to do the rotation there.  Then you shouldn't need to use any CSS rotations in the image editor.