Abstract Class: ImageCache
Defined in: src/sdk/graphics/img/ImageCache.ts:13
A class for caching images. Do your own instrument specific implementation with an init() method that will add images to cache on instrument load to prefill the cache. ImageCache
Constructors
Constructor
new ImageCache():
ImageCache
Returns
ImageCache
Methods
addToCache()
static
addToCache(key
,url
):void
Defined in: src/sdk/graphics/img/ImageCache.ts:22
Loads the image from the url and adds it to the cache.
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The image key to access it later. |
url | string | The url to load the image from. |
Returns
void
Static
get()
static
get(key
):HTMLImageElement
Defined in: src/sdk/graphics/img/ImageCache.ts:36
Gets a cached image element.
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the cached image. |
Returns
HTMLImageElement
The cached image element.