Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to rotate ? #33

Closed
Yactoum opened this issue Feb 26, 2016 · 2 comments
Closed

How to rotate ? #33

Yactoum opened this issue Feb 26, 2016 · 2 comments

Comments

@Yactoum
Copy link

Yactoum commented Feb 26, 2016

Hi, first, I apologize for asking this here, but I don't know where to put it.
I wanted to give a try to the demo and I can't figure out how I can modify the degree variable, I tried to put function in the console of Chrome such as : $('#image').rotate(5) but it says that it doesn't "recognize the function rotate", tried several ways since the beginning of the week but I really don't know what to do...

Regards

@Joeao
Copy link

Joeao commented Feb 26, 2016

Github issues are for issues with the project, whether it be bugs, feature requests, etc. Generally not for asking questions about how to use the project unless the documentation is insufficient and should be improved.

Regardless: If you read the documentation attached to this project, which I recommend you do, you'll see that you're able to rotate an image by calling rotate on the cropper object, not the DOM element. E.g.

var cropper = new Cropper(image, {
    aspectRatio: 1 / 1,
    minCropBoxHeight: 250,
    minCropBoxWidth: 250,
    rotatable:true,
});

cropper.rotate(-90);

In the future, ask your questions on StackOverflow, Gitter or similar websites, it saves the developer hassle.

@fengyuanchen
Copy link
Owner

@Joeao Thank you very very very much for your answer!

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

No branches or pull requests

3 participants