ericdrowell/KineticJS — pull request #84 by davonium (2012-08-31 21:32:49+00:00)
Title: Image src

I have noticed many users having problems with the callback for loading images.

While that approach it more powerful, not all users want to bother about images loading. Specially when saving / loading the stage.

I have added the possibility to add a src-value in the config of an image which then automatically will load when (or after actually) drawing.

example:
http://jsfiddle.net/GwjcJ/

I've been really careful not to damage the buffer layer, and also made sure that the original way of loading images is not effected.

The setSrc function removes the image and fetches it upon redraw.