Seadragon.ImageLoader class

Version - Back to Seadragon Ajax Library

Overview

A utility class that manages the asynchronous download of images. The maximum number of concurrent downloads per instance of this class is defined by Seadragon.Config.imageLoaderLimit, and new image download requests are rejected when all "slots" are filled. As images finish downloading, these slots open up.

Constructors

Signature Description
Seadragon.ImageLoader() Creates an ImageLoader with all slots empty.

Methods

Name and Signature Return Type Description
loadImage(src, callback) Boolean If no image download slots are available, returns false immediately. Otherwise queues an asynchronous download of the image at the given URL and returns true. Once the download is complete, the given callback function is called with the image as the sole argument if the download succeeded, or null if the download failed.