Skip to main content

Seadragon.ImageLoader class

Version 0.8.8 - Back to Seadragon Ajax API Reference

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

SignatureDescription
Seadragon.ImageLoader()Creates an ImageLoader with all slots empty.

Methods

Name and SignatureReturn TypeDescription
loadImage(src, callback)BooleanIf 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.