documentation of opacity and preload relations

This commit is contained in:
thejohnhoffer 2016-11-03 22:39:00 -04:00
parent 3fc1948a44
commit 0a44585457
3 changed files with 10 additions and 9 deletions

View File

@ -185,10 +185,11 @@
* If 0, adjusts to fit viewer.
*
* @property {Number} [opacity=1]
* Default opacity of the tiled images (1=opaque, 0=transparent)
* Default proportional opacity of the tiled images (1=opaque, 0=hidden)
* Hidden images do not draw and only load when preloading is allowed.
*
* @property {Boolean} [preload=false]
* If true, tiles in image load without drawing. Defaults to false, so tiles are loaded and drawn.
* Default switch for loading hidden images (true loads, false blocks)
*
* @property {String} [compositeOperation=null]
* Valid values are 'source-over', 'source-atop', 'source-in', 'source-out',

View File

@ -70,8 +70,8 @@
* @param {Number} [options.minPixelRatio] - See {@link OpenSeadragon.Options}.
* @param {Number} [options.smoothTileEdgesMinZoom] - See {@link OpenSeadragon.Options}.
* @param {Boolean} [options.iOSDevice] - See {@link OpenSeadragon.Options}.
* @param {Number} [options.opacity=1] - Opacity the tiled image should be drawn at.
* @param {Boolean} [options.preload=false] - If true, tiles in image load without drawing. Defaults to false, so tiles are loaded and drawn.
* @param {Number} [options.opacity=1] - Set to draw at proportional opacity. If zero, images will not draw.
* @param {Boolean} [options.preload=false] - Set true to load even when the image is hidden by zero opacity.
* @param {String} [options.compositeOperation] - 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}.
@ -770,15 +770,15 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
},
/**
* @returns {Boolean} whether the tiledImage is set to load tiles without drawing them.
* @returns {Boolean} whether the tiledImage can load hidden tiles of zero opacity.
*/
getPreload: function() {
return this.preload;
},
/**
* Set true to load without drawing. Set false for default loading and drawing.
* @param {Boolean} whether to load tiles without drawing in this tiledImage.
* Set true to load even when hidden. Set false to block loading when hidden.
* @param {Boolean} whether the tiledImage can load hidden tiles of zero opacity.
*/
setPreload: function(preload) {
this.preload = !!preload;

View File

@ -1227,8 +1227,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @param {OpenSeadragon.Rect} [options.clip] - An area, in image pixels, to clip to
* (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=1] Opacity the tiled image should be drawn at by default.
* @param {Boolean} [options.preload=false] If true, tiles in image load without drawing by default.
* @param {Number} [options.opacity=1] Default proportional opacity of the tiled images (1=opaque, 0=hidden)
* @param {Boolean} [options.preload=false] Default switch for loading hidden images (true loads, false blocks)
* @param {Number} [options.degrees=0] Initial rotation of the tiled image around
* its top left corner in degrees.
* @param {String} [options.compositeOperation] How the image is composited onto other images.