Fixed tile image canvas being too large

This commit is contained in:
Wesley Fok 2015-01-30 16:40:34 -05:00
parent 832ba62df0
commit b67cf2aa08

View File

@ -278,8 +278,8 @@ $.Tile.prototype = /** @lends OpenSeadragon.Tile.prototype */{
if(!rendered){ if(!rendered){
canvas = document.createElement( 'canvas' ); canvas = document.createElement( 'canvas' );
canvas.width = this.image.width * $.pixelDensityRatio; canvas.width = this.image.width;
canvas.height = this.image.height * $.pixelDensityRatio; canvas.height = this.image.height;
rendered = canvas.getContext('2d'); rendered = canvas.getContext('2d');
rendered.drawImage( this.image, 0, 0 ); rendered.drawImage( this.image, 0, 0 );
this.cacheImageRecord.setRenderedContext(rendered); this.cacheImageRecord.setRenderedContext(rendered);