bigbite/macy.js

Document callback options offer in runOnImageLoad

Closed this issue · 2 comments

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

Hey @kakposoe

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

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