Class CAAT.Module.Preloader.ImagePreloader
Defined in: ImagePreloader.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
elements counter.
|
|
a list of elements to load.
|
|
notification callback invoked for each image loaded.
|
Method Attributes | Method Name and Description |
---|---|
<private> |
__init()
|
loadImages(aImages, callback_loaded_one_image, callback_error)
Start images loading asynchronous process.
|
Field Detail
imageCounter
elements counter.
images
a list of elements to load.
notificationCallback
notification callback invoked for each image loaded.
Method Detail
<private>
__init()
loadImages(aImages, callback_loaded_one_image, callback_error)
Start images loading asynchronous process. This method will notify every image loaded event
and is responsibility of the caller to count the number of loaded images to see if it fits his
needs.
- Parameters:
- aImages
- {{ id:{url}, id2:{url}, ...} an object with id/url pairs.
- callback_loaded_one_image
- {function( imageloader {CAAT.ImagePreloader}, counter {number}, images {{ id:{string}, image: {Image}}} )} function to call on every image load.
- callback_error