diff --git a/src/openseadragon.js b/src/openseadragon.js index 16e0e86f..f3f14c79 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -209,7 +209,7 @@ * @property {String} [compositeOperation='source-over'] * Valid values are 'source-atop', 'source-in', 'source-out', * 'destination-over', 'destination-atop', 'destination-in', - * 'destination-out', 'lighter', 'copy' or 'xor'.
+ * 'destination-out', 'lighter', 'copy' or 'xor' * * @property {String|CanvasGradient|CanvasPattern|Function} [placeholderFillStyle=null] * Draws a colored rectangle behind the tile if it is not loaded yet. diff --git a/src/tile.js b/src/tile.js index 1adbad13..ad018ba7 100644 --- a/src/tile.js +++ b/src/tile.js @@ -268,7 +268,6 @@ $.Tile.prototype = /** @lends OpenSeadragon.Tile.prototype */{ context.save(); context.globalAlpha = this.opacity; - context.globalCompositeOperation = this.compositeOperation; //if we are supposed to be rendering fully opaque rectangle, //ie its done fading or fading is turned off, and if we are drawing diff --git a/src/tiledimage.js b/src/tiledimage.js index e858cf56..4bdeb634 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -65,7 +65,7 @@ * @param {Boolean} [options.alwaysBlend] - See {@link OpenSeadragon.Options}. * @param {Number} [options.minPixelRatio] - See {@link OpenSeadragon.Options}. * @param {Number} [options.opacity=1] - Opacity the tiled image should be drawn at. - * @param {String} [options.compositeOperation='source-over'] - How a tiled source image are drawn onto an existing image. + * @param {String} [options.compositeOperation='source-over'] - How the image is composited onto other images; see compositeOperation in {@link OpenSeadragon.Options} for possible values. * @param {Boolean} [options.debugMode] - See {@link OpenSeadragon.Options}. * @param {String|CanvasGradient|CanvasPattern|Function} [options.placeholderFillStyle] - See {@link OpenSeadragon.Options}. * @param {String|Boolean} [options.crossOriginPolicy] - See {@link OpenSeadragon.Options}. @@ -1317,7 +1317,7 @@ function drawTiles( tiledImage, lastDrawn ) { drawDebugInfo( tiledImage, lastDrawn ); return; } - var useSketch = (tiledImage.compositeOperation == 'source-over') ? (tiledImage.opacity < 1):true; + var useSketch = tiledImage.opacity < 1 || tiledImage.compositeOperation !== 'source-over'; if ( useSketch ) { tiledImage._drawer._clear( true ); diff --git a/src/viewer.js b/src/viewer.js index c916acd6..20748429 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1207,7 +1207,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, * (portions of the image outside of this area will not be visible). Only works on * browsers that support the HTML5 canvas. * @param {Number} [options.opacity] Opacity the tiled image should be drawn at by default. - * @param {String} [options.compositeOperation] How a tiled source image are drawn onto an existing image. + * @param {String} [options.compositeOperation] How the image is composited onto other images. * @param {Function} [options.success] A function that gets called when the image is * successfully added. It's passed the event object which contains a single property: * "item", the resulting TiledImage.