diff --git a/src/tiledimage.js b/src/tiledimage.js index 4aaef1db..9e4942cc 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -675,9 +675,15 @@ function updateViewport( tiledImage ) { viewportBounds.y -= tiledImage._ySpring.current.value; // Reset tile's internal drawn state + var _hasOpaqueTile; + while ( tiledImage.lastDrawn.length > 0 ) { tile = tiledImage.lastDrawn.pop(); tile.beingDrawn = false; + + if (tile.beingDrawn === false) { + _hasOpaqueTile = false; + } } //Change bounds for rotation @@ -1151,6 +1157,7 @@ function blendTile( tiledImage, tile, x, y, level, levelOpacity, currentTime ){ if ( opacity == 1 ) { setCoverage( tiledImage.coverage, level, x, y, true ); + this._hasOpaqueTile = true; } else if ( deltaTime < blendTimeMillis ) { return true; } @@ -1299,7 +1306,7 @@ function drawTiles( tiledImage, lastDrawn ) { usedClip = true; } - if ( tiledImage.placeholderFillStyle && lastDrawn.length === 0 ) { + if ( tiledImage.placeholderFillStyle && this._hasOpaqueTile === false ) { var placeholderRect = tiledImage._drawer.viewportToDrawerRectangle(tiledImage.getBounds(true)); var fillStyle = null;