diff --git a/changelog.txt b/changelog.txt index 986c73f0..ec2ad4c0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,8 @@ OPENSEADRAGON CHANGELOG ======================= 2.0.1: (in progress) + * BREAKING CHANGE: the tile does not hold a reference to its image anymore. Only the tile cache keep a reference to images. + * DEPRECATION: let ImageRecord.getRenderedContext create the rendered context instead of using ImageRecord.setRenderedContext. 2.0.0: diff --git a/src/tilecache.js b/src/tilecache.js index 297d4081..ee8176ae 100644 --- a/src/tilecache.js +++ b/src/tilecache.js @@ -76,6 +76,13 @@ ImageRecord.prototype = { return this._renderedContext; }, + setRenderedContext: function(renderedContext) { + $.console.error("ImageRecord.setRenderedContext is deprecated. " + + "The rendered context should be created by the ImageRecord " + + "itself when calling ImageRecord.getRenderedContext."); + this._renderedContext = renderedContext; + }, + addTile: function(tile) { $.console.assert(tile, '[ImageRecord.addTile] tile is required'); this._tiles.push(tile); @@ -132,6 +139,7 @@ $.TileCache.prototype = /** @lends OpenSeadragon.TileCache.prototype */{ * may temporarily surpass that number, but should eventually come back down to the max specified. * @param {Object} options - Tile info. * @param {OpenSeadragon.Tile} options.tile - The tile to cache. + * @param {Image} options.image - The image of the tile to cache. * @param {OpenSeadragon.TiledImage} options.tiledImage - The TiledImage that owns that tile. * @param {Number} [options.cutoff=0] - If adding this tile goes over the cache max count, this * function will release an old tile. The cutoff option specifies a tile level at or below which diff --git a/src/tiledimage.js b/src/tiledimage.js index 4e68a3ab..e871fe42 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -860,7 +860,6 @@ function updateTile( tiledImage, drawLevel, haveDrawn, x, y, level, levelOpacity if (!tile.loaded) { var imageRecord = tiledImage._tileCache.getImageRecord(tile.url); if (imageRecord) { - tile.loaded = true; var image = imageRecord.getImage(); setTileLoaded(tiledImage, tile, image); }