mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Docs for Viewer.open()
This commit is contained in:
parent
4d6be50c05
commit
72aa6c4669
@ -126,15 +126,9 @@
|
|||||||
* The element to append the viewer's container element to. If not provided, the 'id' property must be provided.
|
* The element to append the viewer's container element to. If not provided, the 'id' property must be provided.
|
||||||
* If both the element and id properties are specified, the viewer is appended to the element provided in the element property.
|
* If both the element and id properties are specified, the viewer is appended to the element provided in the element property.
|
||||||
*
|
*
|
||||||
* @property {Array|String|Function|Object[]|Array[]|String[]|Function[]} [tileSources=null]
|
* @property {Array|String|Function|Object} [tileSources=null]
|
||||||
* As an Array, the tileSource can hold either Objects or mixed
|
* Tile source(s) to open initially. This is a complex parameter; see
|
||||||
* types of Arrays of Objects, Strings, or Functions. When a value is a String,
|
* {@link OpenSeadragon.Viewer#open} for details.
|
||||||
* the tileSource is used to create a {@link OpenSeadragon.DziTileSource}.
|
|
||||||
* When a value is a Function, the function is used to create a new
|
|
||||||
* {@link OpenSeadragon.TileSource} whose abstract method
|
|
||||||
* getUrl( level, x, y ) is implemented by the function. Finally, when it
|
|
||||||
* is an Array of objects, it is used to create a
|
|
||||||
* {@link OpenSeadragon.LegacyTileSource}.
|
|
||||||
*
|
*
|
||||||
* @property {Array} overlays Array of objects defining permanent overlays of
|
* @property {Array} overlays Array of objects defining permanent overlays of
|
||||||
* the viewer. The overlays added via this option and later removed with
|
* the viewer. The overlays added via this option and later removed with
|
||||||
|
@ -574,48 +574,29 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A deprecated function, renamed to 'open' to match event name and
|
* @private
|
||||||
* match current 'close' method.
|
|
||||||
* @function
|
|
||||||
* @param {String} dzi xml string or the url to a DZI xml document.
|
|
||||||
* @return {OpenSeadragon.Viewer} Chainable.
|
|
||||||
*
|
|
||||||
* @deprecated - use {@link OpenSeadragon.Viewer#open} instead.
|
|
||||||
*/
|
*/
|
||||||
openDzi: function ( dzi ) {
|
openDzi: function ( dzi ) {
|
||||||
|
$.console.error( "[Viewer.openDzi] this function is deprecated; use Viewer.open() instead." );
|
||||||
return this.open( dzi );
|
return this.open( dzi );
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A deprecated function, renamed to 'open' to match event name and
|
* @private
|
||||||
* match current 'close' method.
|
|
||||||
* @function
|
|
||||||
* @param {String|Object|Function} See OpenSeadragon.Viewer.prototype.open
|
|
||||||
* @return {OpenSeadragon.Viewer} Chainable.
|
|
||||||
*
|
|
||||||
* @deprecated - use {@link OpenSeadragon.Viewer#open} instead.
|
|
||||||
*/
|
*/
|
||||||
openTileSource: function ( tileSource ) {
|
openTileSource: function ( tileSource ) {
|
||||||
|
$.console.error( "[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead." );
|
||||||
return this.open( tileSource );
|
return this.open( tileSource );
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a TileSource object into the viewer.
|
* Open tiled images into the viewer.
|
||||||
*
|
|
||||||
* tileSources is a complex option...
|
|
||||||
*
|
|
||||||
* It can be a string, object, function, or an array of any of these:
|
|
||||||
*
|
|
||||||
* - A String implies a url used to determine the tileSource implementation
|
|
||||||
* based on the file extension of url. JSONP is implied by *.js,
|
|
||||||
* otherwise the url is retrieved as text and the resulting text is
|
|
||||||
* introspected to determine if its json, xml, or text and parsed.
|
|
||||||
* - An Object implies an inline configuration which has a single
|
|
||||||
* property sufficient for being able to determine tileSource
|
|
||||||
* implementation. If the object has a property which is a function
|
|
||||||
* named 'getTileUrl', it is treated as a custom TileSource.
|
|
||||||
* @function
|
* @function
|
||||||
* @param {String|Object|Function}
|
* @param {Array|String|Object|Function} tileSources - This can be a TiledImage
|
||||||
|
* specifier, a TileSource specifier, or an array of either. A TiledImage specifier
|
||||||
|
* is the same as the options parameter for {@link OpenSeadragon.Viewer#addTiledImage}.
|
||||||
|
* A TileSource specifier is anything you could pass as the tileSource property
|
||||||
|
* of the options parameter for {@link OpenSeadragon.Viewer#addTiledImage}.
|
||||||
* @return {OpenSeadragon.Viewer} Chainable.
|
* @return {OpenSeadragon.Viewer} Chainable.
|
||||||
* @fires OpenSeadragon.Viewer.event:open
|
* @fires OpenSeadragon.Viewer.event:open
|
||||||
* @fires OpenSeadragon.Viewer.event:open-failed
|
* @fires OpenSeadragon.Viewer.event:open-failed
|
||||||
@ -1261,7 +1242,15 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
* The other dimension will be calculated according to the item's aspect ratio.
|
* The other dimension will be calculated according to the item's aspect ratio.
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} options
|
* @param {Object} options
|
||||||
* @param {String|Object|Function} options.tileSource - The TileSource of the item.
|
* @param {String|Object|Function} options.tileSource - The TileSource specifier.
|
||||||
|
* A String implies a url used to determine the tileSource implementation
|
||||||
|
* based on the file extension of url. JSONP is implied by *.js,
|
||||||
|
* otherwise the url is retrieved as text and the resulting text is
|
||||||
|
* introspected to determine if its json, xml, or text and parsed.
|
||||||
|
* An Object implies an inline configuration which has a single
|
||||||
|
* property sufficient for being able to determine tileSource
|
||||||
|
* implementation. If the object has a property which is a function
|
||||||
|
* named 'getTileUrl', it is treated as a custom TileSource.
|
||||||
* @param {Number} [options.index] The index of the item. Added on top of
|
* @param {Number} [options.index] The index of the item. Added on top of
|
||||||
* all other items if not specified.
|
* all other items if not specified.
|
||||||
* @param {Number} [options.x=0] The X position for the image in world coordinates.
|
* @param {Number} [options.x=0] The X position for the image in world coordinates.
|
||||||
|
Loading…
Reference in New Issue
Block a user