mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 17:21:50 +03:00
Merge pull request #664 from avandecreme/master
Fix assert in cacheTile.
This commit is contained in:
commit
2aa5053961
@ -149,7 +149,6 @@ $.TileCache.prototype = /** @lends OpenSeadragon.TileCache.prototype */{
|
|||||||
$.console.assert( options, "[TileCache.cacheTile] options is required" );
|
$.console.assert( options, "[TileCache.cacheTile] options is required" );
|
||||||
$.console.assert( options.tile, "[TileCache.cacheTile] options.tile is required" );
|
$.console.assert( options.tile, "[TileCache.cacheTile] options.tile is required" );
|
||||||
$.console.assert( options.tile.url, "[TileCache.cacheTile] options.tile.url is required" );
|
$.console.assert( options.tile.url, "[TileCache.cacheTile] options.tile.url is required" );
|
||||||
$.console.assert( options.image, "[TileCache.cacheTile] options.image is required" );
|
|
||||||
$.console.assert( options.tiledImage, "[TileCache.cacheTile] options.tiledImage is required" );
|
$.console.assert( options.tiledImage, "[TileCache.cacheTile] options.tiledImage is required" );
|
||||||
|
|
||||||
var cutoff = options.cutoff || 0;
|
var cutoff = options.cutoff || 0;
|
||||||
@ -157,6 +156,7 @@ $.TileCache.prototype = /** @lends OpenSeadragon.TileCache.prototype */{
|
|||||||
|
|
||||||
var imageRecord = this._imagesLoaded[options.tile.url];
|
var imageRecord = this._imagesLoaded[options.tile.url];
|
||||||
if (!imageRecord) {
|
if (!imageRecord) {
|
||||||
|
$.console.assert( options.image, "[TileCache.cacheTile] options.image is required to create an ImageRecord" );
|
||||||
imageRecord = this._imagesLoaded[options.tile.url] = new ImageRecord({
|
imageRecord = this._imagesLoaded[options.tile.url] = new ImageRecord({
|
||||||
image: options.image
|
image: options.image
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user