smartcrop.js icon indicating copy to clipboard operation
smartcrop.js copied to clipboard

smartcrop takes a callback function as third arg

Open sugoidesune opened this issue 2 years ago • 3 comments

I hope i did the typing right im new to typing

sugoidesune avatar Feb 07 '23 08:02 sugoidesune

Hi Timar,

If I remember correctly the only reason why I kept the callback in is for backwards compatibility I think for new code it would be better to use the Promise returned.

Do you have a specific use case for which the callback works better than a promise?

jwagner avatar Feb 15 '23 18:02 jwagner

No, it's just that it was part of an example and it's obviously annoying to not be able to run it.

sugoidesune avatar Feb 15 '23 20:02 sugoidesune

Do you have a link to the example in question? Would probably be best to just change the example to the recommended way.

jwagner avatar Feb 15 '23 20:02 jwagner