Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

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

Open
umdstu opened this issue Jan 23, 2017 · 0 comments
Open

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

umdstu opened this issue Jan 23, 2017 · 0 comments

Comments

@umdstu
Copy link

umdstu commented Jan 23, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant