Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
This repository was 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

@umdstu

Description

@umdstu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions