Skip to main content

LoadedCachedImage <T>

A cached image whose data is guaranteed to be available.

Hierarchy

Index

Properties

data

data: T

The decoded payload; null until decoding completes.

inheritedlastUsed

lastUsed: number

inheritedstate

state: string

inheritedurl

url: string

Accessors

inheritedcomplete

  • get complete(): boolean
  • Returns boolean

inheritedheight

  • get height(): number
  • Get the image's height


    Returns number

inheritedwidth

  • get width(): number
  • Get the image's width


    Returns number

Methods

inherited_load

  • _load(errCause): Promise<void>
  • 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>

inheritedisAsset

  • isAsset(): boolean
  • Is the image an asset image?


    Returns boolean

inheritedisDoneLoading

  • isDoneLoading(): boolean
  • Is the image loading complete (either succesfully or not)?


    Returns boolean

inheritedisFailing

  • isFailing(): boolean
  • Is the image experiencing problems loading?


    Returns boolean

inheritedisLoaded

  • Is the image loaded and ready?

    When this is true, data is available.


    Returns this is LoadedCachedImage<T>

inheritedisLoading

  • isLoading(): boolean
  • Is the image currently being loaded?


    Returns boolean

inheritedunload

  • unload(): void
  • Unload the image from the cache


    Returns void