bit101 / quicksettings

JavaScript library for making a quick settings panel to control code parameters.
MIT License
458 stars 52 forks source link

Added callback to addImage() method #24

Closed djipco closed 7 years ago

djipco commented 7 years ago

I was in a position where, after calling setValue() on an image control, I needed to wait for the image to be fully loaded before working with it. I figured the logical way to do that would be to add a callback for the addImage() method. This is totally in line with the rest of the API and is very helpful when you need to work with the image after it has been loaded.

I did not register this function with the global change handler nor did I create a bindImage()method. I did not want to screw anything up... Hopefully, you'll agree with this proposition and can look at the ramifications.

Cheers!

bit101 commented 7 years ago

Looks good. Thanks for updating the doc comment too!