CachedImage <T>
Hierarchy
- CachedImage
Index
Constructors
constructor
Create a new cached image.
Parameters
cache: ImageCache<T>
The cache holding the image
url: string
The URL for the image to cache
Returns CachedImage<T>
Properties
data
The decoded payload; null until decoding completes.
lastUsed
state
url
Accessors
complete
Returns boolean
height
Get the image's height
Returns number
width
Get the image's width
Returns number
Methods
_load
Load the cached image if it's not already available.
Reports its outcome through the state, and never rejects.
Parameters
errCause: Error = undefined
An error object the be attached as cause for failed fetch responses. Used primarily for extending the traceback
Returns Promise<void>
isAsset
Is the image an asset image?
Returns boolean
isDoneLoading
Is the image loading complete (either succesfully or not)?
Returns boolean
isFailing
Is the image experiencing problems loading?
Returns boolean
isLoaded
Is the image loaded and ready?
When this is true,
datais available.Returns this is LoadedCachedImage<T>
isLoading
Is the image currently being loaded?
Returns boolean
unload
Unload the image from the cache
Returns void
Cached image data