| Members | Methods |
|---|---|
Constructor
new ImageJob(options)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options for this ImageJob.
Properties
|
- Source:
Members
abort :function
Called automatically when the job times out.
Usage: if you decide to abort the request (no fail/finish will be called), call context.abort().
Type:
- function
- Source:
ajaxHeaders :Object.<string, string>
Headers to add to the image request if using AJAX.
Type:
- Object.<string, string>
- Source:
ajaxWithCredentials :boolean
Whether to set withCredentials on AJAX requests.
Type:
- boolean
- Source:
crossOriginPolicy :String
CORS policy to use for downloads
Type:
- String
- Source:
data :Image|*
Data object which will contain downloaded image data.
Type:
- Image | *
- Source:
loadWithAjax :boolean
Whether to load this image with AJAX.
Type:
- boolean
- Source:
postData :String|Object
HTTP POST data to send with the request
Type:
- String | Object
- Source:
source :OpenSeadragon.TileSource
TileSource that initiated the load and owns the tile. Note the data might be shared between tiles and tile sources.
Type:
- Source:
src :string
URL of image (or other data item that will be rendered) to download.
Type:
- string
- Source:
tile :OpenSeadragon.Tile
Tile that owns the load. Note the data might be shared between tiles.
Type:
- Source:
userData :*
User workspace to populate with helper variables
Type:
- *
- Source:
Methods
finish(data, request, dataType)
Finish this job. Should be called unless abort() was executed upon successful data retrieval.
Usage: context.finish(data, request, dataType=undefined). Pass the downloaded data object
add also reference to an ajax request if used. Optionally, specify what data type the data is.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
* | data that has been downloaded |
request |
XMLHttpRequest | reference to the request if used |
dataType |
string | data type identifier fallback compatibility behavior: dataType treated as errorMessage if data is falsey value |
- Source: