Merge pull request #905 from avandecreme/doc

Fix JSDoc.
This commit is contained in:
Ian Gilman 2016-04-14 16:38:36 -07:00
commit b9df7f3cde
6 changed files with 22 additions and 33 deletions

View File

@ -82,28 +82,9 @@
*/ */
/**
* @version <%= pkg.name %> <%= pkg.version %>
*
* @file
* <h2><strong>OpenSeadragon - Javascript Deep Zooming</strong></h2>
* <p>
* OpenSeadragon provides an html interface for creating
* deep zoom user interfaces. The simplest examples include deep
* zoom for large resolution images, and complex examples include
* zoomable map interfaces driven by SVG files.
* </p>
*
*/
/**
* @module OpenSeadragon
*
*/
/** /**
* @namespace OpenSeadragon * @namespace OpenSeadragon
* * @version <%= pkg.name %> <%= pkg.version %>
* @classdesc The root namespace for OpenSeadragon. All utility methods * @classdesc The root namespace for OpenSeadragon. All utility methods
* and classes are defined on or below this namespace. * and classes are defined on or below this namespace.
* *
@ -691,8 +672,6 @@
* This function serves as a single point of instantiation for an {@link OpenSeadragon.Viewer}, including all * This function serves as a single point of instantiation for an {@link OpenSeadragon.Viewer}, including all
* combinations of out-of-the-box configurable features. * combinations of out-of-the-box configurable features.
* *
* @function OpenSeadragon
* @memberof module:OpenSeadragon
* @param {OpenSeadragon.Options} options - Viewer options. * @param {OpenSeadragon.Options} options - Viewer options.
* @returns {OpenSeadragon.Viewer} * @returns {OpenSeadragon.Viewer}
*/ */

View File

@ -42,6 +42,7 @@
* @member OverlayPlacement * @member OverlayPlacement
* @memberof OpenSeadragon * @memberof OpenSeadragon
* @static * @static
* @readonly
* @type {Object} * @type {Object}
* @property {Number} CENTER * @property {Number} CENTER
* @property {Number} TOP_LEFT * @property {Number} TOP_LEFT
@ -57,8 +58,10 @@
/** /**
* An enumeration of possible ways to handle overlays rotation * An enumeration of possible ways to handle overlays rotation
* @member OverlayRotationMode
* @memberOf OpenSeadragon * @memberOf OpenSeadragon
* @static * @static
* @readonly
* @property {Number} NO_ROTATION The overlay ignore the viewport rotation. * @property {Number} NO_ROTATION The overlay ignore the viewport rotation.
* @property {Number} EXACT The overlay use CSS 3 transforms to rotate with * @property {Number} EXACT The overlay use CSS 3 transforms to rotate with
* the viewport. If the overlay contains text, it will get rotated as well. * the viewport. If the overlay contains text, it will get rotated as well.
@ -66,11 +69,11 @@
* taking the size of the bounding box of the rotated bounds. * taking the size of the bounding box of the rotated bounds.
* Only valid for overlays with Rect location and scalable in both directions. * Only valid for overlays with Rect location and scalable in both directions.
*/ */
$.OverlayRotationMode = { $.OverlayRotationMode = $.freezeObject({
NO_ROTATION: 1, NO_ROTATION: 1,
EXACT: 2, EXACT: 2,
BOUNDING_BOX: 3 BOUNDING_BOX: 3
}; });
/** /**
* @class Overlay * @class Overlay

View File

@ -35,8 +35,10 @@
/** /**
* An enumeration of positions to anchor an element. * An enumeration of positions to anchor an element.
* @member Placement
* @memberOf OpenSeadragon * @memberOf OpenSeadragon
* @static * @static
* @readonly
* @property {OpenSeadragon.Placement} CENTER * @property {OpenSeadragon.Placement} CENTER
* @property {OpenSeadragon.Placement} TOP_LEFT * @property {OpenSeadragon.Placement} TOP_LEFT
* @property {OpenSeadragon.Placement} TOP * @property {OpenSeadragon.Placement} TOP

View File

@ -544,7 +544,7 @@ $.TileSource.prototype = {
/** /**
* Responsible for retriving the url which will return an image for the * Responsible for retriving the url which will return an image for the
* region speified by the given x, y, and level components. * region specified by the given x, y, and level components.
* This method is not implemented by this class other than to throw an Error * This method is not implemented by this class other than to throw an Error
* announcing you have to implement it. Because of the variety of tile * announcing you have to implement it. Because of the variety of tile
* server technologies, and various specifications for building image * server technologies, and various specifications for building image

View File

@ -40,14 +40,19 @@ var nextHash = 1;
/** /**
* *
* The main point of entry into creating a zoomable image on the page. * The main point of entry into creating a zoomable image on the page.<br>
* * <br>
* We have provided an idiomatic javascript constructor which takes * We have provided an idiomatic javascript constructor which takes
* a single object, but still support the legacy positional arguments. * a single object, but still support the legacy positional arguments.<br>
* * <br>
* The options below are given in order that they appeared in the constructor * The options below are given in order that they appeared in the constructor
* as arguments and we translate a positional call into an idiomatic call. * as arguments and we translate a positional call into an idiomatic call.<br>
* * <br>
* To create a viewer, you can use either of this methods:<br>
* <ul>
* <li><code>var viewer = new OpenSeadragon.Viewer(options);</code></li>
* <li><code>var viewer = OpenSeadragon(options);</code></li>
* </ul>
* @class Viewer * @class Viewer
* @classdesc The main OpenSeadragon viewer class. * @classdesc The main OpenSeadragon viewer class.
* *

View File

@ -317,8 +317,8 @@ $.Viewport.prototype = {
}, },
/** /**
* @function
* The margins push the "home" region in from the sides by the specified amounts. * The margins push the "home" region in from the sides by the specified amounts.
* @function
* @returns {Object} Properties (Numbers, in screen coordinates): left, top, right, bottom. * @returns {Object} Properties (Numbers, in screen coordinates): left, top, right, bottom.
*/ */
getMargins: function() { getMargins: function() {
@ -326,8 +326,8 @@ $.Viewport.prototype = {
}, },
/** /**
* @function
* The margins push the "home" region in from the sides by the specified amounts. * The margins push the "home" region in from the sides by the specified amounts.
* @function
* @param {Object} margins - Properties (Numbers, in screen coordinates): left, top, right, bottom. * @param {Object} margins - Properties (Numbers, in screen coordinates): left, top, right, bottom.
*/ */
setMargins: function(margins) { setMargins: function(margins) {