scaleflex / filerobot-image-editor

Edit, resize, and filter any image! Any questions or issues, please report to https://github.com/scaleflex/filerobot-image-editor/issues
MIT License
1.36k stars 341 forks source link

Rotate intervals #237

Open liviuignat opened 2 years ago

liviuignat commented 2 years ago

Hi guys,

Great library. One question about the rotation ranges. Most of the use cases for rotation are 90 / 180 / -90 degrees. Is there any way to configure the rotation angles? I've been looking into the code and seems hardcoded ant 60 degree steps.

Ay way to make it -180 | -90 | 0 | 90 | 180 ?

image
liviuignat commented 2 years ago

@AhmeeedMostafa I see you touched this file last, any ideas? https://github.com/scaleflex/filerobot-image-editor/blob/e1fb6f0b467f0fafffaae56f471cb03a9b5eb580/packages/react-filerobot-image-editor/src/components/tools/Rotate/RotateOptions.jsx

liviuignat commented 2 years ago

ping @dzmitry-stramavus

liviuignat commented 2 years ago

Attached the following PR https://github.com/scaleflex/filerobot-image-editor/pull/240. By when can we get it reviewed and deployed?

amrelbialy commented 2 years ago

Hey @liviuignat, before checking the PR, i see you changed the look for the RotationSlider. Is there a reason for that?

liviuignat commented 2 years ago

Hi @amrelbialy

As context: This PR comes after we updated filerobot-image-editor from the previous major version and after the update @10-20 customers called us that for them it's useful to have a left right button to rotate the image 90 degrees, seeing the slider as a regression.

Important to know is that the current default behaviour was not changed. The rotation slider was not changed. The PR:

liviuignat commented 2 years ago

@amrelbialy I pushed another update, where the watermark image and text ration can also be passed from config. I left your defaults to 0.33.

Another Customer Success request was filed where apparently 0.33 is too big for watermarks for our target customers.

We are a SaaS in real estate sector and they add their company log to listings, and usually they need 0.1 default scale or lower.

Cheers,

ghost commented 2 years ago

Hello, a cordial greeting to the team that has developed the tool, very nice, currently I find myself with this same question, what option should I use to add custom angles to rotate the image, I am using the library from the CDN

amrelbialy commented 2 years ago

Hi @havasjeancarlostrabajo, Thanks and the feature will be available in next release

ghost commented 2 years ago

hi @amrelbialy , okay thank you very much.