mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-20 16:53:14 +03:00
1) update according to comments from openseadragon's
This commit is contained in:
parent
ea833a780c
commit
087507c823
@ -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'.<br>
|
||||
* '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.
|
||||
|
@ -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
|
||||
|
@ -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 );
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user