{"action":"created","issue":{"url":"https://api.github.com/repos/movableink/cropduster/issues/4","labels_url":"https://api.github.com/repos/movableink/cropduster/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/movableink/cropduster/issues/4/comments","events_url":"https://api.github.com/repos/movableink/cropduster/issues/4/events","html_url":"https://github.com/movableink/cropduster/pull/4","id":120264597,"number":4,"title":"update getImages() call to accept a callback that fires only once","user":{"login":"mnutt","id":3705,"avatar_url":"https://avatars.githubusercontent.com/u/3705?v=3","gravatar_id":"","url":"https://api.github.com/users/mnutt","html_url":"https://github.com/mnutt","followers_url":"https://api.github.com/users/mnutt/followers","following_url":"https://api.github.com/users/mnutt/following{/other_user}","gists_url":"https://api.github.com/users/mnutt/gists{/gist_id}","starred_url":"https://api.github.com/users/mnutt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnutt/subscriptions","organizations_url":"https://api.github.com/users/mnutt/orgs","repos_url":"https://api.github.com/users/mnutt/repos","events_url":"https://api.github.com/users/mnutt/events{/privacy}","received_events_url":"https://api.github.com/users/mnutt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-03T20:38:31Z","updated_at":"2016-01-04T21:16:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/movableink/cropduster/pulls/4","html_url":"https://github.com/movableink/cropduster/pull/4","diff_url":"https://github.com/movableink/cropduster/pull/4.diff","patch_url":"https://github.com/movableink/cropduster/pull/4.patch"},"body":"Before, it was `getImages(urls, options, callback);` now it's `getImages(urls, options, callback, singleCallback);`. The `callback` gets called only once after all images have loaded; the `singleCallback` gets fired on each image load, similar to the previous behavior. The `callback` gets called with an argument that is an array of all of the instantiated `Image` objects."},"comment":{"url":"https://api.github.com/repos/movableink/cropduster/issues/comments/168811304","html_url":"https://github.com/movableink/cropduster/pull/4#issuecomment-168811304","issue_url":"https://api.github.com/repos/movableink/cropduster/issues/4","id":168811304,"user":{"login":"Albert","id":19919,"avatar_url":"https://avatars.githubusercontent.com/u/19919?v=3","gravatar_id":"","url":"https://api.github.com/users/Albert","html_url":"https://github.com/Albert","followers_url":"https://api.github.com/users/Albert/followers","following_url":"https://api.github.com/users/Albert/following{/other_user}","gists_url":"https://api.github.com/users/Albert/gists{/gist_id}","starred_url":"https://api.github.com/users/Albert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Albert/subscriptions","organizations_url":"https://api.github.com/users/Albert/orgs","repos_url":"https://api.github.com/users/Albert/repos","events_url":"https://api.github.com/users/Albert/events{/privacy}","received_events_url":"https://api.github.com/users/Albert/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T21:16:22Z","updated_at":"2016-01-04T21:16:22Z","body":"Oh, actually --\r\n\r\nOne thing that has been missing is, within the singleCallback, some way to identify which item in the array it is.  The problem is that these images come back asynchronously, so the only way to determine which image it is is to do a string match."}}