From f51658f0af5483aae24e39e92216a768fac86c6f Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Tue, 23 Feb 2016 20:42:21 +0300 Subject: [PATCH 1/2] don't draw tiles with opacity 0, see #806 --- src/tiledimage.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 7772c186..7499e169 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -240,9 +240,11 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag * Draws the TiledImage to its Drawer. */ draw: function() { - this._midDraw = true; - updateViewport( this ); - this._midDraw = false; + if (this.opacity !== 0) { + this._midDraw = true; + updateViewport( this ); + this._midDraw = false; + } }, /** From 0737ba1a838b8896e969f5a200284a6aed1f936d Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Tue, 23 Feb 2016 20:47:16 +0300 Subject: [PATCH 2/2] update to new coding style --- src/tiledimage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 7499e169..7ad9d7f2 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -242,7 +242,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag draw: function() { if (this.opacity !== 0) { this._midDraw = true; - updateViewport( this ); + updateViewport(this); this._midDraw = false; } },