avatar icon indicating copy to clipboard operation
avatar copied to clipboard

Arbitrary rotation

Open innocenzi opened this issue 3 years ago • 4 comments

Either via a tool in the toolbar, or via the stencil. It wasn't native to vue-advanced-cropper so I didn't implement it right away.

innocenzi avatar May 11 '21 15:05 innocenzi

Hello, @innocenzi! What do you mean by "arbitrary rotation"?

Norserium avatar May 13 '21 07:05 Norserium

Hey, thanks for the awesome lib! It came in very handy. 😊

I mean basically cropper.rotate(angle) but with the stencil. When I say that it isn't native, I meant that there's no way (at least I didn't find one) to do it with the stencil.

What I would have liked is the ability to rotate the background image directly with the cursor. I imagined the ability to press shift and drag around the image, but instead of dragging it, it would rotate it. I guess something like the ResizeEvent would have been perfect.

innocenzi avatar May 13 '21 10:05 innocenzi

Thank you for the answer.

The rotation can be performed only by API now and you, unfortunately, may encounter some troubles during the creation of own wrapper that would be using it.

I'll remember your case, but I'm not sure that I'm ready to provide the solution in the foreseeable future. The best way that I see is providing to you the possibility to redefine cropper-wrapper (it is used to zoom and move image) and its interaction with the cropper component, but it's pretty tough task.

Norserium avatar May 13 '21 10:05 Norserium

Thanks for this info. Honestly, that feature is not a big deal at all, You've already done a lot of good work on this library, so please don't bother looking too much into this. I think the rotate API will be enough to do what I want. :)

innocenzi avatar May 13 '21 12:05 innocenzi