mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Merge pull request #1073 from thejohnhoffer/fullyLoaded
count tiledImage._tilesLoading
This commit is contained in:
commit
a74c9052bc
@ -146,6 +146,7 @@ $.TiledImage = function( options ) {
|
|||||||
_midDraw: false, // Is the tiledImage currently updating the viewport?
|
_midDraw: false, // Is the tiledImage currently updating the viewport?
|
||||||
_needsDraw: true, // Does the tiledImage need to update the viewport again?
|
_needsDraw: true, // Does the tiledImage need to update the viewport again?
|
||||||
_hasOpaqueTile: false, // Do we have even one fully opaque tile?
|
_hasOpaqueTile: false, // Do we have even one fully opaque tile?
|
||||||
|
_tilesLoading: 0, // The number of pending tile requests.
|
||||||
//configurable settings
|
//configurable settings
|
||||||
springStiffness: $.DEFAULT_SETTINGS.springStiffness,
|
springStiffness: $.DEFAULT_SETTINGS.springStiffness,
|
||||||
animationTime: $.DEFAULT_SETTINGS.animationTime,
|
animationTime: $.DEFAULT_SETTINGS.animationTime,
|
||||||
@ -898,6 +899,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
|||||||
// private
|
// private
|
||||||
_updateViewport: function() {
|
_updateViewport: function() {
|
||||||
this._needsDraw = false;
|
this._needsDraw = false;
|
||||||
|
this._tilesLoading = 0;
|
||||||
|
|
||||||
// Reset tile's internal drawn state
|
// Reset tile's internal drawn state
|
||||||
while (this.lastDrawn.length > 0) {
|
while (this.lastDrawn.length > 0) {
|
||||||
@ -994,7 +996,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
|||||||
this._needsDraw = true;
|
this._needsDraw = true;
|
||||||
this._setFullyLoaded(false);
|
this._setFullyLoaded(false);
|
||||||
} else {
|
} else {
|
||||||
this._setFullyLoaded(true);
|
this._setFullyLoaded(this._tilesLoading === 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1178,7 +1180,7 @@ function updateTile( tiledImage, drawLevel, haveDrawn, x, y, level, levelOpacity
|
|||||||
}
|
}
|
||||||
} else if ( tile.loading ) {
|
} else if ( tile.loading ) {
|
||||||
// the tile is already in the download queue
|
// the tile is already in the download queue
|
||||||
// thanks josh1093 for finally translating this typo
|
tiledImage._tilesLoading++;
|
||||||
} else {
|
} else {
|
||||||
best = compareTiles( best, tile );
|
best = compareTiles( best, tile );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user