angular-image-cropper icon indicating copy to clipboard operation
angular-image-cropper copied to clipboard

rotateImage() cuts of part of image if image isn't square

Open umdstu opened this issue 8 years ago • 0 comments

As the title indicates, if you have an image that doesn't have the same width as it does height, calling rotateImage() causes part of the image to be cut off, since the css.left value is, in my current sample, -33.3333%. setting this.elements.image.style.left = 0 right after the transform occurs makes it so the image is no longer cut off. the side effect of this is that the image is now stretched, since it's using the image height instead of the width.

i think a check to see if width > height needs to be in this function somewhere and then depending on the outcome of that, the newWidth and newHeight values are adjusted accordingly.

umdstu avatar Jan 23 '17 14:01 umdstu