mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-03-14 04:56:19 +03:00
Fix docs syntax.
This commit is contained in:
parent
cc7474ec9b
commit
535507568f
@ -82,7 +82,7 @@ class WeightedGraph {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {{path: *[], cost: number}|undefined} cheapest path for
|
||||
* @return {{path: ConversionStep[], cost: number}|undefined} cheapest path from start to finish
|
||||
*/
|
||||
dijkstra(start, finish) {
|
||||
let path = []; //to return at end
|
||||
@ -409,7 +409,7 @@ $.DataTypeConvertor = class {
|
||||
* Get possible system type conversions and cache result.
|
||||
* @param {string} from data item type
|
||||
* @param {string|string[]} to array of accepted types
|
||||
* @return {[ConversionStep]|undefined} array of required conversions (returns empty array
|
||||
* @return {ConversionStep[]|undefined} array of required conversions (returns empty array
|
||||
* for from===to), or undefined if the system cannot convert between given types.
|
||||
* Each object has 'transform' function that converts between neighbouring types, such
|
||||
* that x = arr[i].transform(x) is valid input for convertor arr[i+1].transform(), e.g.
|
||||
|
@ -131,7 +131,7 @@ OpenSeadragon.DrawerBase = class DrawerBase{
|
||||
/**
|
||||
* Retrieve data types
|
||||
* @abstract
|
||||
* @return {[string]}
|
||||
* @return {string[]}
|
||||
*/
|
||||
getSupportedDataFormats() {
|
||||
throw "Drawer.getSupportedDataFormats must define its supported rendering data types!";
|
||||
|
@ -32,7 +32,7 @@ $.PriorityQueue = class {
|
||||
*
|
||||
* The only invariant is that children's keys must be greater than parents'.
|
||||
*
|
||||
* @private @const {!Array<!Node>}
|
||||
* @private
|
||||
*/
|
||||
this.nodes_ = [];
|
||||
|
||||
@ -334,13 +334,15 @@ $.PriorityQueue.Node = class {
|
||||
constructor(key, value) {
|
||||
/**
|
||||
* The key.
|
||||
* @private {K}
|
||||
* @type {K}
|
||||
* @private
|
||||
*/
|
||||
this.key = key;
|
||||
|
||||
/**
|
||||
* The value.
|
||||
* @private {V}
|
||||
* @type {V}
|
||||
* @private
|
||||
*/
|
||||
this.value = value;
|
||||
|
||||
|
@ -104,9 +104,9 @@ $.Tile = function(level, x, y, bounds, exists, url, context2D, loadWithAjax, aja
|
||||
/**
|
||||
* Private property to hold string url or url retriever function.
|
||||
* Consumers should access via Tile.getUrl()
|
||||
* @private
|
||||
* @member {String|Function} url
|
||||
* @memberof OpenSeadragon.Tile#
|
||||
* @private
|
||||
*/
|
||||
this._url = url;
|
||||
/**
|
||||
@ -193,9 +193,9 @@ $.Tile = function(level, x, y, bounds, exists, url, context2D, loadWithAjax, aja
|
||||
/**
|
||||
* The squared distance of this tile to the viewport center.
|
||||
* Use for comparing tiles.
|
||||
* @private
|
||||
* @member {Number} squaredDistance
|
||||
* @memberof OpenSeadragon.Tile#
|
||||
* @private
|
||||
*/
|
||||
this.squaredDistance = null;
|
||||
/**
|
||||
@ -461,7 +461,7 @@ $.Tile.prototype = {
|
||||
/**
|
||||
* The context2D of this tile if it is provided directly by the tile source.
|
||||
* @deprecated
|
||||
* @type {CanvasRenderingContext2D} context2D
|
||||
* @type {CanvasRenderingContext2D}
|
||||
*/
|
||||
get context2D() {
|
||||
$.console.error("[Tile.context2D] property has been deprecated. Use [Tile.getData] instead.");
|
||||
@ -565,8 +565,8 @@ $.Tile.prototype = {
|
||||
* Optimizazion: prepare target cache for subsequent use in rendering, and perform updateRenderTarget()
|
||||
* The main idea of this function is that it must be ASYNCHRONOUS since there might be additional processing
|
||||
* happening due to underlying drawer requirements.
|
||||
* @private
|
||||
* @return {OpenSeadragon.Promise<?>}
|
||||
* @private
|
||||
*/
|
||||
updateRenderTargetWithDataTransform: function (drawerId, supportedFormats, usePrivateCache, processTimestamp) {
|
||||
// Now, if working cache exists, we set main cache to the working cache --> prepare
|
||||
@ -606,7 +606,6 @@ $.Tile.prototype = {
|
||||
* The main idea of this function is that it is SYNCHRONOUS, e.g. can perform in-place cache swap to update
|
||||
* before any rendering occurs.
|
||||
* @private
|
||||
* @return
|
||||
*/
|
||||
updateRenderTarget: function (_allowTileNotLoaded = false) {
|
||||
// Check if we asked for restore, and make sure we set it to false since we update the whole cache state
|
||||
|
@ -162,7 +162,6 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Access of the data by drawers, synchronous function. Should always access a valid main cache, e.g.
|
||||
* cache swap performed on working cache (consumeCache()) must be synchronous such that cache is always
|
||||
* ready to render, and swaps atomically between render calls.
|
||||
@ -173,6 +172,7 @@
|
||||
* for which we request the data; if we attempt to draw such tile while main cache target is destroyed,
|
||||
* attempt to reset the tile state to force system to re-download it again
|
||||
* @returns {any|undefined} desired data if available, undefined if conversion must be done
|
||||
* @private
|
||||
*/
|
||||
getDataForRendering(drawer, tileToDraw ) {
|
||||
const supportedTypes = drawer.getSupportedDataFormats(),
|
||||
@ -272,7 +272,7 @@
|
||||
* Does nothing if the type equals to the current type. Asynchronous.
|
||||
* Transformation is LAZY, meaning conversions are performed only to
|
||||
* match the last conversion request target type.
|
||||
* @param {string|[string]} type if array provided, the system will
|
||||
* @param {string|string[]} type if array provided, the system will
|
||||
* try to optimize for the best type to convert to.
|
||||
* @return {OpenSeadragon.Promise<?>}
|
||||
*/
|
||||
@ -650,7 +650,7 @@
|
||||
/**
|
||||
* Transform cache to desired type and get the data after conversion.
|
||||
* Does nothing if the type equals to the current type. Asynchronous.
|
||||
* @param {string|[string]} type if array provided, the system will
|
||||
* @param {string|string[]} type if array provided, the system will
|
||||
* try to optimize for the best type to convert to.
|
||||
* @returns {OpenSeadragon.Promise<?>}
|
||||
*/
|
||||
@ -877,7 +877,6 @@
|
||||
|
||||
/**
|
||||
* Reads a cache if it exists and creates a new copy of a target, different cache if it does not
|
||||
* @private
|
||||
* @param {Object} options
|
||||
* @param {OpenSeadragon.Tile} options.tile - The tile to own ot add record for the cache.
|
||||
* @param {String} options.copyTargetKey - The unique key used to identify this tile in the cache.
|
||||
@ -888,6 +887,7 @@
|
||||
* function will release an old tile. The cutoff option specifies a tile level at or below which
|
||||
* tiles will not be released.
|
||||
* @returns {OpenSeadragon.Promise<OpenSeadragon.CacheRecord>} - New record.
|
||||
* @private
|
||||
*/
|
||||
cloneCache(options) {
|
||||
const theTile = options.tile;
|
||||
@ -909,7 +909,6 @@
|
||||
|
||||
/**
|
||||
* Consume cache by another cache
|
||||
* @private
|
||||
* @param {Object} options
|
||||
* @param {OpenSeadragon.Tile} options.tile - The tile to own ot add record for the cache.
|
||||
* @param {String} options.victimKey - Cache that will be erased. In fact, the victim _replaces_ consumer,
|
||||
@ -919,6 +918,7 @@
|
||||
* @param {Boolean} options.tileAllowNotLoaded - if true, tile that is not loaded is also processed,
|
||||
* this is internal parameter used in tile-loaded completion routine, as we need to prepare tile but
|
||||
* it is not yet loaded and cannot be marked as so (otherwise the system would think it is ready)
|
||||
* @private
|
||||
*/
|
||||
consumeCache(options) {
|
||||
const victim = this._cachesLoaded[options.victimKey],
|
||||
@ -958,12 +958,12 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* This method ensures other tiles are restored if one of the tiles
|
||||
* was requested restore().
|
||||
* @param tile
|
||||
* @param originalCache
|
||||
* @param freeIfUnused if true, zombie is not created
|
||||
* @private
|
||||
*/
|
||||
restoreTilesThatShareOriginalCache(tile, originalCache, freeIfUnused) {
|
||||
for (let t of originalCache._tiles) {
|
||||
|
@ -799,11 +799,11 @@ $.TileSource.prototype = {
|
||||
* add also reference to an ajax request if used.
|
||||
* @param {Function} [context.abort] - Called automatically when the job times out.
|
||||
* Usage: if you decide to abort the request (no fail/finish will be called), call context.abort().
|
||||
* @param {Function} [context.callback] @private - Called automatically once image has been downloaded
|
||||
* @param {Function} [context.callback] Private parameter. Called automatically once image has been downloaded
|
||||
* (triggered by finish).
|
||||
* @param {Number} [context.timeout] @private - The max number of milliseconds that
|
||||
* @param {Number} [context.timeout] Private parameter. The max number of milliseconds that
|
||||
* this image job may take to complete.
|
||||
* @param {string} [context.errorMsg] @private - The final error message, default null (set by finish).
|
||||
* @param {string} [context.errorMsg] Private parameter. The final error message, default null (set by finish).
|
||||
*/
|
||||
downloadTileStart: function (context) {
|
||||
const dataStore = context.userData,
|
||||
|
@ -200,7 +200,7 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 'webgl'
|
||||
* @returns {string} 'webgl'
|
||||
*/
|
||||
getType(){
|
||||
return 'webgl';
|
||||
|
Loading…
x
Reference in New Issue
Block a user