From 2674104007b5b1054d323de61d07d559b2583afc Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Wed, 3 Jun 2015 13:52:19 -0400 Subject: [PATCH] Fix flickering tiles with useCanvas=false when no cache is used. Fix #661 --- changelog.txt | 1 + src/tile.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index ec2ad4c0..e5b00e19 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ 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. +* Fix flickering tiles with useCanvas=false when no cache is used. (#661) 2.0.0: diff --git a/src/tile.js b/src/tile.js index 3ad71ad3..48f3503c 100644 --- a/src/tile.js +++ b/src/tile.js @@ -210,8 +210,7 @@ $.Tile.prototype = /** @lends OpenSeadragon.Tile.prototype */{ if ( !this.element ) { this.element = $.makeNeutralElement( "div" ); - this.imgElement = $.makeNeutralElement( "img" ); - this.imgElement.src = this.url; + this.imgElement = this.cacheImageRecord.getImage().cloneNode(); this.imgElement.style.msInterpolationMode = "nearest-neighbor"; this.imgElement.style.width = "100%"; this.imgElement.style.height = "100%";