mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-31 15:12:07 +03:00
Update documentation for Drawer#loadImage.
Additionally, improve name of the parameter passed to the complete listener.
This commit is contained in:
parent
bb0ac1f9d1
commit
8f085c83ca
@ -7957,10 +7957,10 @@ $.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.
|
||||
* @return {Boolean} loading - Wheter the request was submitted or ignored
|
||||
* 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.
|
||||
*/
|
||||
loadImage: function( src, callback ) {
|
||||
@ -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",
|
||||
|
@ -273,10 +273,10 @@ $.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.
|
||||
* @return {Boolean} loading - Wheter the request was submitted or ignored
|
||||
* 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.
|
||||
*/
|
||||
loadImage: function( src, callback ) {
|
||||
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user