jquery - Image is a little larger after rotating with jQueryRotate -


I have tried to use both and v1.7. But after the rotation, the image is slightly larger in both cases. How can I solve this problem? I am moving with the following code:

  var test = 0; $ ('# Working-field .Rotiable'). Live ('click', function (event) {test = test + 90; $ ($); Rotate ({angle: test, prevention: "work area"})});    

The image will definitely take a bigger position when it rotates, especially if the image is one Rectangle because the height and width are of various sizes. For example, take an 8x4 piece paper, to rotate it 45 degrees footpath. You will find that the paper now takes half of its previous height and repeats its preceding width. Now rotate it 22.5 degrees and you will find that the height is now 3/4 bigger.

The general solution is to create a square amplitude prevention with the height or width of the image, whichever is higher, then when rotating, add a quadrant to that value to adjust the change in the dimension.

Comments