From f64388b0387e2b9d18786c7f7297e6d905b7704f Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 4 Oct 2017 16:11:08 -0400 Subject: [PATCH 1/2] Solves issue #1318 : transparent tiledImages get _needsDraw = false in the draw function. --- src/tiledimage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tiledimage.js b/src/tiledimage.js index a289026a..44ddba33 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -311,6 +311,10 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag this._updateViewport(); this._midDraw = false; } + // Images with opacity 0 should not need to be drawn in future. this._needsDraw = false is set in this._updateViewport() for other images. + if (this.opacity === 0) { + this._needsDraw = false; + } }, /** From 44b108f00e18fa91ca6ae04748422bce40d131ae Mon Sep 17 00:00:00 2001 From: Peter Date: Thu, 5 Oct 2017 14:44:56 -0400 Subject: [PATCH 2/2] changed conditional if to else in draw function --- src/tiledimage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 44ddba33..bfc67fc8 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -312,7 +312,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag this._midDraw = false; } // Images with opacity 0 should not need to be drawn in future. this._needsDraw = false is set in this._updateViewport() for other images. - if (this.opacity === 0) { + else { this._needsDraw = false; } },