LoadController

Load controller.

Constructor

new LoadController(defaultCharacterSet)

Parameters:
NameTypeDescription
defaultCharacterSetstring

The default character set.

Classes

LoadController

Methods

abort(dataId)

Abort an individual current loader.

Parameters:
NameTypeDescription
dataIdstring

The data to stop loading.

getLoadingDataIds() → {Array.<string>}

Get the currently loaded data ids.

Returns:

The data ids.

Type: 
Array.<string>

loadFiles(files, dataId)

Load a list of files. Can be image files or a state file.

Parameters:
NameTypeDescription
filesArray.<File>

The list of files to load.

dataIdstring

The data Id.

loadImageObject(data, dataId)

Load a list of ArrayBuffers.

Parameters:
NameTypeDescription
dataArray

The list of ArrayBuffers to load in the form of [{name: '', filename: '', data: data}].

dataIdstring

The data Id.

loadURLs(urls, dataId, optionsopt)

Load a list of URLs. Can be image files or a state file.

Parameters:
NameTypeAttributesDescription
urlsArray.<string>

The list of urls to load.

dataIdstring

The data Id.

optionsobject<optional>

The load options:

  • requestHeaders: an array of {name, value} to use as request headers.
  • withCredentials: credentials flag to pass to the request.

onabort(_event)

Handle an abort event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The abort event.

onerror(_event)

Handle an error event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The error event.

onload(_event)

Handle a load event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The load event fired when a file has been loaded successfully.

onloadend(_event)

Handle a load end event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The load end event fired when a file load has completed, successfully or not.

onloaditem(_event)

Handle a load item event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The load event fired when an item has been loaded successfully.

onloadstart(_event)

Handle a load start event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The load start event.

onprogress(_event)

Handle a load progress event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The progress event.