diff --git a/src/canvasdrawer.js b/src/canvasdrawer.js index a637fb39..37b8c3bb 100644 --- a/src/canvasdrawer.js +++ b/src/canvasdrawer.js @@ -102,7 +102,7 @@ class CanvasDrawer extends $.DrawerBase{ this._prepareNewFrame(); // prepare to draw a new frame for(const tiledImage of tiledImages){ - if (tiledImage.opacity !== 0 || tiledImage._preload) { + if (tiledImage.opacity !== 0) { this._drawTiles(tiledImage); } } diff --git a/src/htmldrawer.js b/src/htmldrawer.js index a9030702..6e154095 100644 --- a/src/htmldrawer.js +++ b/src/htmldrawer.js @@ -89,7 +89,7 @@ class HTMLDrawer extends $.DrawerBase{ var _this = this; this._prepareNewFrame(); // prepare to draw a new frame tiledImages.forEach(function(tiledImage){ - if (tiledImage.opacity !== 0 || tiledImage._preload) { + if (tiledImage.opacity !== 0) { _this._drawTiles(tiledImage); } }); diff --git a/src/webgldrawer.js b/src/webgldrawer.js index a3cda706..046c33e4 100644 --- a/src/webgldrawer.js +++ b/src/webgldrawer.js @@ -222,7 +222,7 @@ let tilesToDraw = tiledImage.getTilesToDraw(); - if(tilesToDraw.length === 0){ + if(tilesToDraw.length === 0 || tiledImage.getOpacity() === 0){ return; } let firstTile = tilesToDraw[0]; diff --git a/test/demo/drawercomparison.js b/test/demo/drawercomparison.js index bd95deaa..96793915 100644 --- a/test/demo/drawercomparison.js +++ b/test/demo/drawercomparison.js @@ -1,5 +1,5 @@ const sources = { - "rainbow": "../data/testpattern.dzi", + "rainbow":"../data/testpattern.dzi", "leaves":"../data/iiif_2_0_sizes/info.json", "bblue":{ type:'image',