jwagner / smartcrop.js

Content aware image cropping
http://29a.ch/2014/04/03/smartcrop-content-aware-image-cropping
MIT License
12.84k stars 577 forks source link

smartcrop takes a callback function as third arg #119

Open sugoidesune opened 1 year ago

sugoidesune commented 1 year ago

I hope i did the typing right im new to typing

jwagner commented 1 year ago

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?

sugoidesune commented 1 year ago

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

jwagner commented 1 year ago

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