From bd4cabaec2f0e965e6601b44af1ebf14aa6394bf Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Tue, 5 Apr 2016 20:00:35 -0400 Subject: [PATCH 1/4] Fix JSDoc. --- src/openseadragon.js | 8 +------- src/viewport.js | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index 07523516..7b51ee7f 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -96,11 +96,6 @@ * */ -/** - * @module OpenSeadragon - * - */ - /** * @namespace OpenSeadragon * @@ -691,8 +686,7 @@ * This function serves as a single point of instantiation for an {@link OpenSeadragon.Viewer}, including all * combinations of out-of-the-box configurable features. * - * @function OpenSeadragon - * @memberof module:OpenSeadragon + * @function * @param {OpenSeadragon.Options} options - Viewer options. * @returns {OpenSeadragon.Viewer} */ diff --git a/src/viewport.js b/src/viewport.js index 63b4dcaf..12dd958d 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -317,8 +317,8 @@ $.Viewport.prototype = { }, /** - * @function * 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. */ getMargins: function() { @@ -326,8 +326,8 @@ $.Viewport.prototype = { }, /** - * @function * 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. */ setMargins: function(margins) { From 5ebf84a580c4af1b6e84ecf523911e481818c8ac Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Sat, 9 Apr 2016 10:14:09 -0400 Subject: [PATCH 2/4] Fix typo in doc. --- src/tilesource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tilesource.js b/src/tilesource.js index 290a5758..03854bbc 100644 --- a/src/tilesource.js +++ b/src/tilesource.js @@ -544,7 +544,7 @@ $.TileSource.prototype = { /** * 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 * announcing you have to implement it. Because of the variety of tile * server technologies, and various specifications for building image From 4fa7ed159000db58d9e9cf15b177bbd1c3ce1353 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Sat, 9 Apr 2016 10:15:02 -0400 Subject: [PATCH 3/4] Adapt doc to new version of JSDoc. --- src/openseadragon.js | 17 +---------------- src/viewer.js | 17 +++++++++++------ 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index 7b51ee7f..cee2d9e3 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -82,23 +82,9 @@ */ -/** - * @version <%= pkg.name %> <%= pkg.version %> - * - * @file - *

OpenSeadragon - Javascript Deep Zooming

- *

- * 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. - *

- * - */ - /** * @namespace OpenSeadragon - * + * @version <%= pkg.name %> <%= pkg.version %> * @classdesc The root namespace for OpenSeadragon. All utility methods * and classes are defined on or below this namespace. * @@ -686,7 +672,6 @@ * This function serves as a single point of instantiation for an {@link OpenSeadragon.Viewer}, including all * combinations of out-of-the-box configurable features. * - * @function * @param {OpenSeadragon.Options} options - Viewer options. * @returns {OpenSeadragon.Viewer} */ diff --git a/src/viewer.js b/src/viewer.js index d3cce4b8..b647ee41 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -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.
+ *
* 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.
+ *
* 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.
+ *
+ * To create a viewer, you can use either of this methods:
+ *
    + *
  • var viewer = new OpenSeadragon.Viewer(options);
  • + *
  • var viewer = OpenSeadragon(options);
  • + *
* @class Viewer * @classdesc The main OpenSeadragon viewer class. * From 4bf7b629398b0e79da8efc247396facb87811b61 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Sun, 10 Apr 2016 19:01:30 -0400 Subject: [PATCH 4/4] Fix enums doc. --- src/overlay.js | 7 +++++-- src/placement.js | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/overlay.js b/src/overlay.js index 76eb347c..25cc50d2 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -42,6 +42,7 @@ * @member OverlayPlacement * @memberof OpenSeadragon * @static + * @readonly * @type {Object} * @property {Number} CENTER * @property {Number} TOP_LEFT @@ -57,8 +58,10 @@ /** * An enumeration of possible ways to handle overlays rotation + * @member OverlayRotationMode * @memberOf OpenSeadragon * @static + * @readonly * @property {Number} NO_ROTATION The overlay ignore the viewport rotation. * @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. @@ -66,11 +69,11 @@ * taking the size of the bounding box of the rotated bounds. * Only valid for overlays with Rect location and scalable in both directions. */ - $.OverlayRotationMode = { + $.OverlayRotationMode = $.freezeObject({ NO_ROTATION: 1, EXACT: 2, BOUNDING_BOX: 3 - }; + }); /** * @class Overlay diff --git a/src/placement.js b/src/placement.js index a90bf5da..561d5daf 100644 --- a/src/placement.js +++ b/src/placement.js @@ -35,8 +35,10 @@ /** * An enumeration of positions to anchor an element. + * @member Placement * @memberOf OpenSeadragon * @static + * @readonly * @property {OpenSeadragon.Placement} CENTER * @property {OpenSeadragon.Placement} TOP_LEFT * @property {OpenSeadragon.Placement} TOP