Fix placeholderFillStyle on tiledImage has no effect

This commit is contained in:
Mutlu Koesem 2017-08-09 11:39:17 +02:00
parent 7f5a18e46a
commit 8a4ef0cc2e

View File

@ -1805,15 +1805,19 @@ function compareTiles( previousBest, tile ) {
* @param {OpenSeadragon.Tile[]} lastDrawn - An unordered list of Tiles drawn last frame.
*/
function drawTiles( tiledImage, lastDrawn ) {
if (tiledImage.opacity === 0 || lastDrawn.length === 0) {
if (tiledImage.opacity === 0 || (lastDrawn.length === 0 && !tiledImage.placeholderFillStyle)) {
return;
}
var tile = lastDrawn[0];
var useSketch = tiledImage.opacity < 1 ||
(tiledImage.compositeOperation &&
tiledImage.compositeOperation !== 'source-over') ||
(!tiledImage._isBottomItem() && tile._hasTransparencyChannel());
var tile = lastDrawn[0];
var useSketch;
if (tile) {
useSketch = tiledImage.opacity < 1 ||
(tiledImage.compositeOperation &&
tiledImage.compositeOperation !== 'source-over') ||
(!tiledImage._isBottomItem() && tile._hasTransparencyChannel());
}
var sketchScale;
var sketchTranslate;