Update documentation for Drawer#loadImage.

Additionally, improve name of the parameter passed to the complete
listener.
This commit is contained in:
Ventero 2013-01-25 20:36:41 +01:00
parent bb0ac1f9d1
commit 8f085c83ca
2 changed files with 12 additions and 12 deletions

View File

@ -7957,9 +7957,9 @@ $.Drawer.prototype = {
* @method
* @param {String} src - The url of the image to load.
* @param {Function} callback - The function that will be called with the
* Image object as the only parameter, whether on 'load' or on 'abort'.
* For now this means the callback is expected to distinguish between
* error and success conditions by inspecting the Image object.
* Image object as the only parameter if it was loaded successfully.
* If an error occured, or the request timed out or was aborted,
* the parameter is null instead.
* @return {Boolean} loading - Wheter the request was submitted or ignored
* based on OpenSeadragon.DEFAULT_SETTINGS.imageLoaderLimit.
*/
@ -7977,11 +7977,11 @@ $.Drawer.prototype = {
image = new Image();
complete = function( imagesrc, img ){
complete = function( imagesrc, resultingImage ){
_this.downloading--;
if (typeof ( callback ) == "function") {
try {
callback( img );
callback( resultingImage );
} catch ( e ) {
$.console.error(
"%s while executing %s callback: %s",

View File

@ -273,9 +273,9 @@ $.Drawer.prototype = {
* @method
* @param {String} src - The url of the image to load.
* @param {Function} callback - The function that will be called with the
* Image object as the only parameter, whether on 'load' or on 'abort'.
* For now this means the callback is expected to distinguish between
* error and success conditions by inspecting the Image object.
* Image object as the only parameter if it was loaded successfully.
* If an error occured, or the request timed out or was aborted,
* the parameter is null instead.
* @return {Boolean} loading - Wheter the request was submitted or ignored
* based on OpenSeadragon.DEFAULT_SETTINGS.imageLoaderLimit.
*/
@ -293,11 +293,11 @@ $.Drawer.prototype = {
image = new Image();
complete = function( imagesrc, img ){
complete = function( imagesrc, resultingImage ){
_this.downloading--;
if (typeof ( callback ) == "function") {
try {
callback( img );
callback( resultingImage );
} catch ( e ) {
$.console.error(
"%s while executing %s callback: %s",