simplify the checks on compositeOperation

This commit is contained in:
Mei-Hui Su 2016-01-20 09:48:15 -08:00
parent 91ecd80a4f
commit 69cce5770c
2 changed files with 2 additions and 2 deletions

View File

@ -384,7 +384,7 @@ $.Drawer.prototype = /** @lends OpenSeadragon.Drawer.prototype */{
this.context.save(); this.context.save();
this.context.globalAlpha = opacity; this.context.globalAlpha = opacity;
if (compositeOperation !== undefined && compositeOperation !== null) { if (compositeOperation) {
this.context.globalCompositeOperation = compositeOperation; this.context.globalCompositeOperation = compositeOperation;
} }
this.context.drawImage( this.context.drawImage(

View File

@ -1330,7 +1330,7 @@ function drawTiles( tiledImage, lastDrawn ) {
return; return;
} }
var useSketch = tiledImage.opacity < 1 || var useSketch = tiledImage.opacity < 1 ||
(tiledImage.compositeOperation !== null && tiledImage.compositeOperation !== 'source-over'); (tiledImage.compositeOperation && tiledImage.compositeOperation !== 'source-over');
var sketchScale; var sketchScale;
var sketchTranslate; var sketchTranslate;