bigbite / macy.js

http://macyjs.com/
MIT License
1.3k stars 156 forks source link

Document callback options offer in runOnImageLoad #61

Closed kakposoe closed 4 years ago

kakposoe commented 5 years ago

Within the documentation, I did not see it mentioned that there is the ability to retrieve data about the loaded image:

macyInstance.runOnImageLoad(function (image) {
  console.log(image.data.img);
  macyInstance.recalculate(true);
}, true);

It would be good to let people know this option is possible.

jrmd commented 4 years ago

Hey @kakposoe

Thanks for pointing this out. In previous versions, runOnImageLoad never passed the image to callback, I'll update the README

kakposoe commented 4 years ago

@jrmd Thanks for clearing up and thank you for your work on this.