From f64388b0387e2b9d18786c7f7297e6d905b7704f Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 4 Oct 2017 16:11:08 -0400 Subject: [PATCH] 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; + } }, /**