Compare commits

...

11 Commits

Author SHA1 Message Date
Ian Gilman
c470e7effd Changelog for #2219 2022-10-20 14:29:06 -07:00
Ian Gilman
d5bcbcec3a
Merge pull request #2220 from jssullivan/master
Fixes #2219 TypeError: Cannot set property buttons of [object Object] which has only a getter when initializing OpenSeaDragon
2022-10-20 14:27:29 -07:00
Ian Gilman
38027e7588 Changelog for #2211 2022-10-20 14:23:27 -07:00
Ian Gilman
bbac0f0355
Merge pull request #2211 from openseaforce/docss
docs: change `@return` -> `@returns`
2022-10-20 14:21:42 -07:00
Jimmy Sullivan
13330c4ede
Update viewer.js
Remove erroneous whitespace
2022-10-19 11:35:49 -04:00
Jimmy Sullivan
8bb600f6ae
Update viewer.js
Change removing buttons, to renaming it buttonGroup
2022-10-19 11:35:08 -04:00
Shyamkumar Yadav
98972d22d1
docs: fix a jsdoc 2022-10-19 10:25:37 +05:30
james.sullivan
333be9d6ca Remove version bump 2022-10-14 10:51:56 -04:00
james.sullivan
f87310c082 Fix initilization crash caused by Extend and buttons getter 2022-10-14 10:47:48 -04:00
james.sullivan
1a1b8e4510 v3.2.0-pre 2022-10-13 17:36:50 -04:00
Shyamkumar Yadav
5baa8d3252
docs: change @return -> @returns 2022-10-10 01:12:18 +05:30
19 changed files with 88 additions and 86 deletions

View File

@ -9,10 +9,11 @@ OPENSEADRAGON CHANGELOG
* You can now provide an element for the navigator (as an alternative to an ID) (#1303 @cameronbaney, #2166 #2175 @joedf) * You can now provide an element for the navigator (as an alternative to an ID) (#1303 @cameronbaney, #2166 #2175 @joedf)
* Now supporting IIIF "id" and "identifier" in addition to "@id" (#2173 @ahankinson) * Now supporting IIIF "id" and "identifier" in addition to "@id" (#2173 @ahankinson)
* We now delegate tile fetching and caching to the TileSource, to allow for custom tile formats (#2148 @Aiosa) * We now delegate tile fetching and caching to the TileSource, to allow for custom tile formats (#2148 @Aiosa)
* Improved documentation (#2211 @shyamkumaryadav)
* Fixed: Cropping tiled images with polygons was broken (#2183 @altert) * Fixed: Cropping tiled images with polygons was broken (#2183 @altert)
* Fixed: Disabling buttons only changed their appearance, but they were still clickable (#2187 @pearcetm) * Fixed: Disabling buttons only changed their appearance, but they were still clickable (#2187 @pearcetm)
* Fixed: ImageTileSource produced an error having to do with getTileHashKey (#2190 @Aiosa) * Fixed: ImageTileSource produced an error having to do with getTileHashKey (#2190 @Aiosa)
* Fixed: On startup you would get an unnecessary "Viewer.buttons is deprecated" warning (#2201 @joedf) * Fixed: On startup you would get an unnecessary "Viewer.buttons is deprecated" warning (#2201 @joedf, #2219 @jssullivan)
3.1.0: 3.1.0:

View File

@ -169,7 +169,7 @@ $.Control.prototype = {
/** /**
* Determines if the control is currently visible. * Determines if the control is currently visible.
* @function * @function
* @return {Boolean} true if currently visible, false otherwise. * @returns {Boolean} true if currently visible, false otherwise.
*/ */
isVisible: function() { isVisible: function() {
return this.wrapper.style.display !== "none"; return this.wrapper.style.display !== "none";

View File

@ -149,7 +149,7 @@
/** /**
* @function * @function
* @return {OpenSeadragon.ControlDock} Chainable. * @returns {OpenSeadragon.ControlDock} Chainable.
*/ */
removeControl: function ( element ) { removeControl: function ( element ) {
element = $.getElement( element ); element = $.getElement( element );
@ -165,7 +165,7 @@
/** /**
* @function * @function
* @return {OpenSeadragon.ControlDock} Chainable. * @returns {OpenSeadragon.ControlDock} Chainable.
*/ */
clearControls: function () { clearControls: function () {
while ( this.controls.length > 0 ) { while ( this.controls.length > 0 ) {
@ -178,7 +178,7 @@
/** /**
* @function * @function
* @return {Boolean} * @returns {Boolean}
*/ */
areControlsEnabled: function () { areControlsEnabled: function () {
var i; var i;
@ -195,7 +195,7 @@
/** /**
* @function * @function
* @return {OpenSeadragon.ControlDock} Chainable. * @returns {OpenSeadragon.ControlDock} Chainable.
*/ */
setControlsEnabled: function( enabled ) { setControlsEnabled: function( enabled ) {
var i; var i;

View File

@ -176,6 +176,7 @@ $.Drawer.prototype = {
* This function does not take rotation into account, thus assuming provided * This function does not take rotation into account, thus assuming provided
* point is at 0 degree. * point is at 0 degree.
* @param {OpenSeadragon.Point} point - the pixel point to convert * @param {OpenSeadragon.Point} point - the pixel point to convert
* @returns {OpenSeadragon.Point} Point in drawer coordinate system.
*/ */
viewportCoordToDrawerCoord: function(point) { viewportCoordToDrawerCoord: function(point) {
var vpPoint = this.viewport.pixelFromPointNoRotate(point, true); var vpPoint = this.viewport.pixelFromPointNoRotate(point, true);
@ -208,7 +209,7 @@ $.Drawer.prototype = {
/** /**
* Set the opacity of the drawer. * Set the opacity of the drawer.
* @param {Number} opacity * @param {Number} opacity
* @return {OpenSeadragon.Drawer} Chainable. * @returns {OpenSeadragon.Drawer} Chainable.
*/ */
setOpacity: function( opacity ) { setOpacity: function( opacity ) {
$.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead."); $.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");
@ -264,7 +265,7 @@ $.Drawer.prototype = {
}, },
/** /**
* @return {Boolean} True if rotation is supported. * @returns {Boolean} True if rotation is supported.
*/ */
canRotate: function() { canRotate: function() {
return this.useCanvas; return this.useCanvas;
@ -321,7 +322,7 @@ $.Drawer.prototype = {
* Scale from OpenSeadragon viewer rectangle to drawer rectangle * Scale from OpenSeadragon viewer rectangle to drawer rectangle
* (ignoring rotation) * (ignoring rotation)
* @param {OpenSeadragon.Rect} rectangle - The rectangle in viewport coordinate system. * @param {OpenSeadragon.Rect} rectangle - The rectangle in viewport coordinate system.
* @return {OpenSeadragon.Rect} Rectangle in drawer coordinate system. * @returns {OpenSeadragon.Rect} Rectangle in drawer coordinate system.
*/ */
viewportToDrawerRectangle: function(rectangle) { viewportToDrawerRectangle: function(rectangle) {
var topLeft = this.viewport.pixelFromPointNoRotate(rectangle.getTopLeft(), true); var topLeft = this.viewport.pixelFromPointNoRotate(rectangle.getTopLeft(), true);

View File

@ -125,7 +125,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
* @param {Object|XMLDocument} data - the raw configuration * @param {Object|XMLDocument} data - the raw configuration
* @param {String} url - the url the data was retrieved from if any. * @param {String} url - the url the data was retrieved from if any.
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null
* @return {Object} options - A dictionary of keyword arguments sufficient * @returns {Object} options - A dictionary of keyword arguments sufficient
* to configure this tile sources constructor. * to configure this tile sources constructor.
*/ */
configure: function( data, url, postData ){ configure: function( data, url, postData ){

View File

@ -125,7 +125,7 @@ $.EventSource.prototype = {
/** /**
* Get the amount of handlers registered for a given event. * Get the amount of handlers registered for a given event.
* @param {String} eventName - Name of event to inspect. * @param {String} eventName - Name of event to inspect.
* @return {number} amount of events * @returns {number} amount of events
*/ */
numberOfHandlers: function (eventName) { numberOfHandlers: function (eventName) {
var events = this.events[ eventName ]; var events = this.events[ eventName ];

View File

@ -193,7 +193,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
* @param {Object} data - the raw configuration * @param {Object} data - the raw configuration
* @param {String} url - the url configuration was retrieved from * @param {String} url - the url configuration was retrieved from
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null
* @return {Object} A normalized IIIF data object * @returns {Object} A normalized IIIF data object
* @example <caption>IIIF 2.x Info Looks like this</caption> * @example <caption>IIIF 2.x Info Looks like this</caption>
* { * {
* "@context": "http://iiif.io/api/image/2/context.json", * "@context": "http://iiif.io/api/image/2/context.json",
@ -456,7 +456,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
* @param {Object} options * @param {Object} options
* @param {Array|String} options.profile * @param {Array|String} options.profile
* @param {Number} options.version * @param {Number} options.version
* @param {String} options.extraFeatures * @param {String[]} options.extraFeatures
* @returns {Boolean} * @returns {Boolean}
*/ */
function canBeTiled ( options ) { function canBeTiled ( options ) {

View File

@ -90,7 +90,7 @@
* @param {Object} options - the options * @param {Object} options - the options
* @param {String} dataUrl - the url the image was retrieved from, if any. * @param {String} dataUrl - the url the image was retrieved from, if any.
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null
* @return {Object} options - A dictionary of keyword arguments sufficient * @returns {Object} options - A dictionary of keyword arguments sufficient
* to configure this tile sources constructor. * to configure this tile sources constructor.
*/ */
configure: function (options, dataUrl, postData) { configure: function (options, dataUrl, postData) {

View File

@ -123,7 +123,7 @@ $.extend( $.LegacyTileSource.prototype, $.TileSource.prototype, /** @lends OpenS
* @param {Object|XMLDocument} configuration - the raw configuration * @param {Object|XMLDocument} configuration - the raw configuration
* @param {String} dataUrl - the url the data was retrieved from if any. * @param {String} dataUrl - the url the data was retrieved from if any.
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null
* @return {Object} options - A dictionary of keyword arguments sufficient * @returns {Object} options - A dictionary of keyword arguments sufficient
* to configure this tile sources constructor. * to configure this tile sources constructor.
*/ */
configure: function( configuration, dataUrl, postData ){ configure: function( configuration, dataUrl, postData ){

View File

@ -922,7 +922,7 @@ function OpenSeadragon( options ){
/** /**
* Shim around Object.freeze. Does nothing if Object.freeze is not supported. * Shim around Object.freeze. Does nothing if Object.freeze is not supported.
* @param {Object} obj The object to freeze. * @param {Object} obj The object to freeze.
* @return {Object} obj The frozen object. * @returns {Object} obj The frozen object.
*/ */
$.freezeObject = function(obj) { $.freezeObject = function(obj) {
if (Object.freeze) { if (Object.freeze) {
@ -2109,7 +2109,7 @@ function OpenSeadragon( options ){
* @param {Boolean} [options.capture] * @param {Boolean} [options.capture]
* @param {Boolean} [options.passive] * @param {Boolean} [options.passive]
* @param {Boolean} [options.once] * @param {Boolean} [options.once]
* @return {String} The protocol (http:, https:, file:, ftp: ...) * @returns {String} The protocol (http:, https:, file:, ftp: ...)
*/ */
normalizeEventListenerOptions: function (options) { normalizeEventListenerOptions: function (options) {
var opts; var opts;
@ -2273,7 +2273,7 @@ function OpenSeadragon( options ){
* @function * @function
* @private * @private
* @param {String} url The url to retrieve the protocol from. * @param {String} url The url to retrieve the protocol from.
* @return {String} The protocol (http:, https:, file:, ftp: ...) * @returns {String} The protocol (http:, https:, file:, ftp: ...)
*/ */
getUrlProtocol: function( url ) { getUrlProtocol: function( url ) {
var match = url.match(/^([a-z]+:)\/\//i); var match = url.match(/^([a-z]+:)\/\//i);

View File

@ -123,7 +123,7 @@ $.extend( $.OsmTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
* @param {Object} data - the raw configuration * @param {Object} data - the raw configuration
* @param {String} url - the url the data was retrieved from if any. * @param {String} url - the url the data was retrieved from if any.
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null
* @return {Object} options - A dictionary of keyword arguments sufficient * @returns {Object} options - A dictionary of keyword arguments sufficient
* to configure this tile sources constructor. * to configure this tile sources constructor.
*/ */
configure: function( data, url, postData ){ configure: function( data, url, postData ){

View File

@ -240,7 +240,7 @@ $.Rect.prototype = {
* Determines if two Rectangles have equivalent components. * Determines if two Rectangles have equivalent components.
* @function * @function
* @param {OpenSeadragon.Rect} rectangle The Rectangle to compare to. * @param {OpenSeadragon.Rect} rectangle The Rectangle to compare to.
* @return {Boolean} 'true' if all components are equal, otherwise 'false'. * @returns {Boolean} 'true' if all components are equal, otherwise 'false'.
*/ */
equals: function(other) { equals: function(other) {
return (other instanceof $.Rect) && return (other instanceof $.Rect) &&
@ -287,7 +287,7 @@ $.Rect.prototype = {
* Returns the smallest rectangle that will contain this and the given * Returns the smallest rectangle that will contain this and the given
* rectangle bounding boxes. * rectangle bounding boxes.
* @param {OpenSeadragon.Rect} rect * @param {OpenSeadragon.Rect} rect
* @return {OpenSeadragon.Rect} The new rectangle. * @returns {OpenSeadragon.Rect} The new rectangle.
*/ */
union: function(rect) { union: function(rect) {
var thisBoundingBox = this.getBoundingBox(); var thisBoundingBox = this.getBoundingBox();
@ -313,7 +313,7 @@ $.Rect.prototype = {
* Returns the bounding box of the intersection of this rectangle with the * Returns the bounding box of the intersection of this rectangle with the
* given rectangle. * given rectangle.
* @param {OpenSeadragon.Rect} rect * @param {OpenSeadragon.Rect} rect
* @return {OpenSeadragon.Rect} the bounding box of the intersection * @returns {OpenSeadragon.Rect} the bounding box of the intersection
* or null if the rectangles don't intersect. * or null if the rectangles don't intersect.
*/ */
intersection: function(rect) { intersection: function(rect) {
@ -441,7 +441,7 @@ $.Rect.prototype = {
* @param {Number} degrees The angle in degrees to rotate. * @param {Number} degrees The angle in degrees to rotate.
* @param {OpenSeadragon.Point} [pivot] The point about which to rotate. * @param {OpenSeadragon.Point} [pivot] The point about which to rotate.
* Defaults to the center of the rectangle. * Defaults to the center of the rectangle.
* @return {OpenSeadragon.Rect} * @returns {OpenSeadragon.Rect}
*/ */
rotate: function(degrees, pivot) { rotate: function(degrees, pivot) {
degrees = $.positiveModulo(degrees, 360); degrees = $.positiveModulo(degrees, 360);

View File

@ -335,7 +335,7 @@ $.Tile.prototype = {
* @member {Object} image * @member {Object} image
* @memberof OpenSeadragon.Tile# * @memberof OpenSeadragon.Tile#
* @deprecated * @deprecated
* @return {Image} * @returns {Image}
*/ */
get image() { get image() {
$.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."); $.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead.");
@ -344,7 +344,7 @@ $.Tile.prototype = {
/** /**
* Get the Image object for this tile. * Get the Image object for this tile.
* @return {Image} * @returns {Image}
*/ */
getImage: function() { getImage: function() {
return this.cacheImageRecord.getImage(); return this.cacheImageRecord.getImage();
@ -353,7 +353,7 @@ $.Tile.prototype = {
/** /**
* Get the CanvasRenderingContext2D instance for tile image data drawn * Get the CanvasRenderingContext2D instance for tile image data drawn
* onto Canvas if enabled and available * onto Canvas if enabled and available
* @return {CanvasRenderingContext2D} * @returns {CanvasRenderingContext2D}
*/ */
getCanvasContext: function() { getCanvasContext: function() {
return this.context2D || this.cacheImageRecord.getRenderedContext(); return this.context2D || this.cacheImageRecord.getRenderedContext();
@ -469,7 +469,7 @@ $.Tile.prototype = {
/** /**
* Get the ratio between current and original size. * Get the ratio between current and original size.
* @function * @function
* @return {Float} * @returns {Float}
*/ */
getScaleForEdgeSmoothing: function() { getScaleForEdgeSmoothing: function() {
var context; var context;
@ -491,7 +491,7 @@ $.Tile.prototype = {
* Needed to avoid swimming and twitching. * Needed to avoid swimming and twitching.
* @function * @function
* @param {Number} [scale=1] - Scale to be applied to position. * @param {Number} [scale=1] - Scale to be applied to position.
* @return {OpenSeadragon.Point} * @returns {OpenSeadragon.Point}
*/ */
getTranslationForEdgeSmoothing: function(scale, canvasSize, sketchCanvasSize) { getTranslationForEdgeSmoothing: function(scale, canvasSize, sketchCanvasSize) {
// The translation vector must have positive values, otherwise the image goes a bit off // The translation vector must have positive values, otherwise the image goes a bit off

View File

@ -443,7 +443,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
* @param {Number|OpenSeadragon.Point} viewerX - The X coordinate or point in viewport coordinate system. * @param {Number|OpenSeadragon.Point} viewerX - The X coordinate or point in viewport coordinate system.
* @param {Number} [viewerY] - The Y coordinate in viewport coordinate system. * @param {Number} [viewerY] - The Y coordinate in viewport coordinate system.
* @param {Boolean} [current=false] - Pass true to use the current location; false for target location. * @param {Boolean} [current=false] - Pass true to use the current location; false for target location.
* @return {OpenSeadragon.Point} A point representing the coordinates in the image. * @returns {OpenSeadragon.Point} A point representing the coordinates in the image.
*/ */
viewportToImageCoordinates: function(viewerX, viewerY, current) { viewportToImageCoordinates: function(viewerX, viewerY, current) {
var point; var point;
@ -478,7 +478,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
* @param {Number|OpenSeadragon.Point} imageX - The X coordinate or point in image coordinate system. * @param {Number|OpenSeadragon.Point} imageX - The X coordinate or point in image coordinate system.
* @param {Number} [imageY] - The Y coordinate in image coordinate system. * @param {Number} [imageY] - The Y coordinate in image coordinate system.
* @param {Boolean} [current=false] - Pass true to use the current location; false for target location. * @param {Boolean} [current=false] - Pass true to use the current location; false for target location.
* @return {OpenSeadragon.Point} A point representing the coordinates in the viewport. * @returns {OpenSeadragon.Point} A point representing the coordinates in the viewport.
*/ */
imageToViewportCoordinates: function(imageX, imageY, current) { imageToViewportCoordinates: function(imageX, imageY, current) {
if (imageX instanceof $.Point) { if (imageX instanceof $.Point) {
@ -509,7 +509,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
* @param {Number} [pixelWidth] - The width in pixel of the rectangle. * @param {Number} [pixelWidth] - The width in pixel of the rectangle.
* @param {Number} [pixelHeight] - The height in pixel of the rectangle. * @param {Number} [pixelHeight] - The height in pixel of the rectangle.
* @param {Boolean} [current=false] - Pass true to use the current location; false for target location. * @param {Boolean} [current=false] - Pass true to use the current location; false for target location.
* @return {OpenSeadragon.Rect} A rect representing the coordinates in the viewport. * @returns {OpenSeadragon.Rect} A rect representing the coordinates in the viewport.
*/ */
imageToViewportRectangle: function(imageX, imageY, pixelWidth, pixelHeight, current) { imageToViewportRectangle: function(imageX, imageY, pixelWidth, pixelHeight, current) {
var rect = imageX; var rect = imageX;
@ -541,7 +541,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
* @param {Number} [pointWidth] - The width in viewport coordinate system. * @param {Number} [pointWidth] - The width in viewport coordinate system.
* @param {Number} [pointHeight] - The height in viewport coordinate system. * @param {Number} [pointHeight] - The height in viewport coordinate system.
* @param {Boolean} [current=false] - Pass true to use the current location; false for target location. * @param {Boolean} [current=false] - Pass true to use the current location; false for target location.
* @return {OpenSeadragon.Rect} A rect representing the coordinates in the image. * @returns {OpenSeadragon.Rect} A rect representing the coordinates in the image.
*/ */
viewportToImageRectangle: function( viewerX, viewerY, pointWidth, pointHeight, current ) { viewportToImageRectangle: function( viewerX, viewerY, pointWidth, pointHeight, current ) {
var rect = viewerX; var rect = viewerX;

View File

@ -579,7 +579,7 @@ $.TileSource.prototype = {
* @param {String|Object|Array|Document} data * @param {String|Object|Array|Document} data
* @param {String} url - the url the data was loaded * @param {String} url - the url the data was loaded
* from if any. * from if any.
* @return {Boolean} * @returns {Boolean}
*/ */
supports: function( data, url ) { supports: function( data, url ) {
return false; return false;
@ -598,7 +598,7 @@ $.TileSource.prototype = {
* from if any. * from if any.
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null value obtained from * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null value obtained from
* the protocol URL after '#' sign if flag splitHashDataForPost set to 'true' * the protocol URL after '#' sign if flag splitHashDataForPost set to 'true'
* @return {Object} options - A dictionary of keyword arguments sufficient * @returns {Object} options - A dictionary of keyword arguments sufficient
* to configure the tile source constructor (include all values you want to * to configure the tile source constructor (include all values you want to
* instantiate the TileSource subclass with - what _options_ object should contain). * instantiate the TileSource subclass with - what _options_ object should contain).
* @throws {Error} * @throws {Error}
@ -649,7 +649,7 @@ $.TileSource.prototype = {
* @param {Number} level * @param {Number} level
* @param {Number} x * @param {Number} x
* @param {Number} y * @param {Number} y
* @return {*|null} post data to send with tile configuration request * @returns {*|null} post data to send with tile configuration request
*/ */
getTilePostData: function( level, x, y ) { getTilePostData: function( level, x, y ) {
return null; return null;
@ -716,7 +716,7 @@ $.TileSource.prototype = {
/** /**
* Decide whether tiles have transparency: this is crucial for correct images blending. * Decide whether tiles have transparency: this is crucial for correct images blending.
* @return {boolean} true if the image has transparency * @returns {boolean} true if the image has transparency
*/ */
hasTransparency: function(context2D, url, ajaxHeaders, post) { hasTransparency: function(context2D, url, ajaxHeaders, post) {
return !!context2D || url.match('.png'); return !!context2D || url.match('.png');
@ -862,7 +862,7 @@ $.TileSource.prototype = {
* Raw data getter * Raw data getter
* Note that if you override any of *TileCache() functions, you should override all of them. * Note that if you override any of *TileCache() functions, you should override all of them.
* @param {object} cacheObject context cache object * @param {object} cacheObject context cache object
* @return {*} cache data * @returns {*} cache data
*/ */
getTileCacheData: function(cacheObject) { getTileCacheData: function(cacheObject) {
return cacheObject._data; return cacheObject._data;
@ -874,7 +874,7 @@ $.TileSource.prototype = {
* - div HTML rendering relies on image element presence * - div HTML rendering relies on image element presence
* Note that if you override any of *TileCache() functions, you should override all of them. * Note that if you override any of *TileCache() functions, you should override all of them.
* @param {object} cacheObject context cache object * @param {object} cacheObject context cache object
* @return {Image} cache data as an Image * @returns {Image} cache data as an Image
*/ */
getTileCacheDataAsImage: function(cacheObject) { getTileCacheDataAsImage: function(cacheObject) {
return cacheObject._data; //the data itself by default is Image return cacheObject._data; //the data itself by default is Image
@ -886,7 +886,7 @@ $.TileSource.prototype = {
* convert the data to a canvas and return it's 2D context * convert the data to a canvas and return it's 2D context
* Note that if you override any of *TileCache() functions, you should override all of them. * Note that if you override any of *TileCache() functions, you should override all of them.
* @param {object} cacheObject context cache object * @param {object} cacheObject context cache object
* @return {CanvasRenderingContext2D} context of the canvas representation of the cache data * @returns {CanvasRenderingContext2D} context of the canvas representation of the cache data
*/ */
getTileCacheDataAsContext2D: function(cacheObject) { getTileCacheDataAsContext2D: function(cacheObject) {
if (!cacheObject._renderedContext) { if (!cacheObject._renderedContext) {

View File

@ -112,7 +112,7 @@ $.extend( $.TmsTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
* @param {Object} data - the raw configuration * @param {Object} data - the raw configuration
* @param {String} url - the url the data was retrieved from if any. * @param {String} url - the url the data was retrieved from if any.
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null
* @return {Object} options - A dictionary of keyword arguments sufficient * @returns {Object} options - A dictionary of keyword arguments sufficient
* to configure this tile sources constructor. * to configure this tile sources constructor.
*/ */
configure: function( data, url, postData ){ configure: function( data, url, postData ){

View File

@ -182,7 +182,7 @@ $.Viewer = function( options ) {
navImages: null, navImages: null,
//interface button controls //interface button controls
buttons: null, buttonGroup: null,
//TODO: this is defunct so safely remove it //TODO: this is defunct so safely remove it
profiler: null profiler: null
@ -491,7 +491,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {Boolean} * @returns {Boolean}
*/ */
isOpen: function () { isOpen: function () {
return !!this.world.getItemCount(); return !!this.world.getItemCount();
@ -529,7 +529,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* of the options parameter for {@link OpenSeadragon.Viewer#addTiledImage}. * of the options parameter for {@link OpenSeadragon.Viewer#addTiledImage}.
* @param {Number} initialPage - If sequenceMode is true, display this page initially * @param {Number} initialPage - If sequenceMode is true, display this page initially
* for the given tileSources. If specified, will overwrite the Viewer's existing initialPage property. * for the given tileSources. If specified, will overwrite the Viewer's existing initialPage property.
* @return {OpenSeadragon.Viewer} Chainable. * @returns {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
*/ */
@ -701,7 +701,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:close * @fires OpenSeadragon.Viewer.event:close
*/ */
close: function ( ) { close: function ( ) {
@ -843,7 +843,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {Boolean} * @returns {Boolean}
*/ */
isMouseNavEnabled: function () { isMouseNavEnabled: function () {
return this.innerTracker.isTracking(); return this.innerTracker.isTracking();
@ -852,7 +852,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @param {Boolean} enabled - true to enable, false to disable * @param {Boolean} enabled - true to enable, false to disable
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:mouse-enabled * @fires OpenSeadragon.Viewer.event:mouse-enabled
*/ */
setMouseNavEnabled: function( enabled ){ setMouseNavEnabled: function( enabled ){
@ -875,7 +875,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {Boolean} * @returns {Boolean}
*/ */
areControlsEnabled: function () { areControlsEnabled: function () {
var enabled = this.controls.length, var enabled = this.controls.length,
@ -892,7 +892,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* *
* @function * @function
* @param {Boolean} true to show, false to hide. * @param {Boolean} true to show, false to hide.
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:controls-enabled * @fires OpenSeadragon.Viewer.event:controls-enabled
*/ */
setControlsEnabled: function( enabled ) { setControlsEnabled: function( enabled ) {
@ -933,7 +933,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {Boolean} * @returns {Boolean}
*/ */
isFullPage: function () { isFullPage: function () {
return THIS[ this.hash ].fullPage; return THIS[ this.hash ].fullPage;
@ -945,7 +945,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @function * @function
* @param {Boolean} fullPage * @param {Boolean} fullPage
* If true, enter full page mode. If false, exit full page mode. * If true, enter full page mode. If false, exit full page mode.
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:pre-full-page * @fires OpenSeadragon.Viewer.event:pre-full-page
* @fires OpenSeadragon.Viewer.event:full-page * @fires OpenSeadragon.Viewer.event:full-page
*/ */
@ -1160,7 +1160,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @function * @function
* @param {Boolean} fullScreen * @param {Boolean} fullScreen
* If true, enter full screen mode. If false, exit full screen mode. * If true, enter full screen mode. If false, exit full screen mode.
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:pre-full-screen * @fires OpenSeadragon.Viewer.event:pre-full-screen
* @fires OpenSeadragon.Viewer.event:full-screen * @fires OpenSeadragon.Viewer.event:full-screen
*/ */
@ -1255,7 +1255,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {Boolean} * @returns {Boolean}
*/ */
isVisible: function () { isVisible: function () {
return this.container.style.visibility !== "hidden"; return this.container.style.visibility !== "hidden";
@ -1274,7 +1274,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @param {Boolean} visible * @param {Boolean} visible
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:visible * @fires OpenSeadragon.Viewer.event:visible
*/ */
setVisible: function( visible ){ setVisible: function( visible ){
@ -1655,7 +1655,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
*/ */
bindSequenceControls: function(){ bindSequenceControls: function(){
@ -1744,7 +1744,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
*/ */
bindStandardControls: function(){ bindStandardControls: function(){
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
@ -1926,7 +1926,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* Gets the active page of a sequence * Gets the active page of a sequence
* @function * @function
* @return {Number} * @returns {Number}
*/ */
currentPage: function() { currentPage: function() {
return this._sequenceIndex; return this._sequenceIndex;
@ -1934,7 +1934,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/** /**
* @function * @function
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:page * @fires OpenSeadragon.Viewer.event:page
*/ */
goToPage: function( page ){ goToPage: function( page ){
@ -1983,7 +1983,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @param {function} [onDraw] - If supplied the callback is called when the overlay * @param {function} [onDraw] - If supplied the callback is called when the overlay
* needs to be drawn. It it the responsibility of the callback to do any drawing/positioning. * needs to be drawn. It it the responsibility of the callback to do any drawing/positioning.
* It is passed position, size and element. * It is passed position, size and element.
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:add-overlay * @fires OpenSeadragon.Viewer.event:add-overlay
*/ */
addOverlay: function( element, location, placement, onDraw ) { addOverlay: function( element, location, placement, onDraw ) {
@ -2041,7 +2041,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @param {OpenSeadragon.Placement} [placement=OpenSeadragon.Placement.TOP_LEFT] - The position of the * @param {OpenSeadragon.Placement} [placement=OpenSeadragon.Placement.TOP_LEFT] - The position of the
* viewport which the location coordinates will be treated as relative * viewport which the location coordinates will be treated as relative
* to. * to.
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:update-overlay * @fires OpenSeadragon.Viewer.event:update-overlay
*/ */
updateOverlay: function( element, location, placement ) { updateOverlay: function( element, location, placement ) {
@ -2082,7 +2082,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @method * @method
* @param {Element|String} element - A reference to the element or an * @param {Element|String} element - A reference to the element or an
* element id which represent the ovelay content to be removed. * element id which represent the ovelay content to be removed.
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:remove-overlay * @fires OpenSeadragon.Viewer.event:remove-overlay
*/ */
removeOverlay: function( element ) { removeOverlay: function( element ) {
@ -2118,7 +2118,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* Removes all currently configured Overlays from this Viewer and schedules * Removes all currently configured Overlays from this Viewer and schedules
* an update. * an update.
* @method * @method
* @return {OpenSeadragon.Viewer} Chainable. * @returns {OpenSeadragon.Viewer} Chainable.
* @fires OpenSeadragon.Viewer.event:clear-overlay * @fires OpenSeadragon.Viewer.event:clear-overlay
*/ */
clearOverlays: function() { clearOverlays: function() {
@ -2145,7 +2145,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @method * @method
* @param {Element|String} element - A reference to the element or an * @param {Element|String} element - A reference to the element or an
* element id which represents the overlay content. * element id which represents the overlay content.
* @return {OpenSeadragon.Overlay} the matching overlay or null if none found. * @returns {OpenSeadragon.Overlay} the matching overlay or null if none found.
*/ */
getOverlayById: function( element ) { getOverlayById: function( element ) {
var i; var i;
@ -2226,7 +2226,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* Gets this viewer's gesture settings for the given pointer device type. * Gets this viewer's gesture settings for the given pointer device type.
* @method * @method
* @param {String} type - The pointer device type to get the gesture settings for ("mouse", "touch", "pen", etc.). * @param {String} type - The pointer device type to get the gesture settings for ("mouse", "touch", "pen", etc.).
* @return {OpenSeadragon.GestureSettings} * @returns {OpenSeadragon.GestureSettings}
*/ */
gestureSettingsByDeviceType: function ( type ) { gestureSettingsByDeviceType: function ( type ) {
switch ( type ) { switch ( type ) {

View File

@ -172,7 +172,7 @@ $.Viewport.prototype = {
* Updates the viewport's home bounds and constraints for the given content size. * Updates the viewport's home bounds and constraints for the given content size.
* @function * @function
* @param {OpenSeadragon.Point} contentSize - size of the content in content units * @param {OpenSeadragon.Point} contentSize - size of the content in content units
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:reset-size * @fires OpenSeadragon.Viewer.event:reset-size
*/ */
resetContentSize: function(contentSize) { resetContentSize: function(contentSize) {
@ -511,7 +511,7 @@ $.Viewport.prototype = {
* @function * @function
* @private * @private
* @param {OpenSeadragon.Rect} bounds * @param {OpenSeadragon.Rect} bounds
* @return {OpenSeadragon.Rect} constrained bounds. * @returns {OpenSeadragon.Rect} constrained bounds.
*/ */
_applyBoundaryConstraints: function(bounds) { _applyBoundaryConstraints: function(bounds) {
var newBounds = new $.Rect( var newBounds = new $.Rect(
@ -615,7 +615,7 @@ $.Viewport.prototype = {
* zooming and panning to the closest acceptable zoom and location. * zooming and panning to the closest acceptable zoom and location.
* @function * @function
* @param {Boolean} [immediately=false] * @param {Boolean} [immediately=false]
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:constrain * @fires OpenSeadragon.Viewer.event:constrain
*/ */
applyConstraints: function(immediately) { applyConstraints: function(immediately) {
@ -644,7 +644,7 @@ $.Viewport.prototype = {
* Equivalent to {@link OpenSeadragon.Viewport#applyConstraints} * Equivalent to {@link OpenSeadragon.Viewport#applyConstraints}
* @function * @function
* @param {Boolean} [immediately=false] * @param {Boolean} [immediately=false]
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:constrain * @fires OpenSeadragon.Viewer.event:constrain
*/ */
ensureVisible: function(immediately) { ensureVisible: function(immediately) {
@ -656,7 +656,7 @@ $.Viewport.prototype = {
* @private * @private
* @param {OpenSeadragon.Rect} bounds * @param {OpenSeadragon.Rect} bounds
* @param {Object} options (immediately=false, constraints=false) * @param {Object} options (immediately=false, constraints=false)
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
_fitBounds: function(bounds, options) { _fitBounds: function(bounds, options) {
options = options || {}; options = options || {};
@ -737,7 +737,7 @@ $.Viewport.prototype = {
* @function * @function
* @param {OpenSeadragon.Rect} bounds * @param {OpenSeadragon.Rect} bounds
* @param {Boolean} [immediately=false] * @param {Boolean} [immediately=false]
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
fitBounds: function(bounds, immediately) { fitBounds: function(bounds, immediately) {
return this._fitBounds(bounds, { return this._fitBounds(bounds, {
@ -756,7 +756,7 @@ $.Viewport.prototype = {
* @function * @function
* @param {OpenSeadragon.Rect} bounds * @param {OpenSeadragon.Rect} bounds
* @param {Boolean} [immediately=false] * @param {Boolean} [immediately=false]
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
fitBoundsWithConstraints: function(bounds, immediately) { fitBoundsWithConstraints: function(bounds, immediately) {
return this._fitBounds(bounds, { return this._fitBounds(bounds, {
@ -768,7 +768,7 @@ $.Viewport.prototype = {
/** /**
* Zooms so the image just fills the viewer vertically. * Zooms so the image just fills the viewer vertically.
* @param {Boolean} immediately * @param {Boolean} immediately
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
fitVertically: function(immediately) { fitVertically: function(immediately) {
var box = new $.Rect( var box = new $.Rect(
@ -782,7 +782,7 @@ $.Viewport.prototype = {
/** /**
* Zooms so the image just fills the viewer horizontally. * Zooms so the image just fills the viewer horizontally.
* @param {Boolean} immediately * @param {Boolean} immediately
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
fitHorizontally: function(immediately) { fitHorizontally: function(immediately) {
var box = new $.Rect( var box = new $.Rect(
@ -798,7 +798,7 @@ $.Viewport.prototype = {
* Returns bounds taking constraints into account * Returns bounds taking constraints into account
* Added to improve constrained panning * Added to improve constrained panning
* @param {Boolean} current - Pass true for the current location; defaults to false (target location). * @param {Boolean} current - Pass true for the current location; defaults to false (target location).
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
getConstrainedBounds: function(current) { getConstrainedBounds: function(current) {
var bounds, var bounds,
@ -815,7 +815,7 @@ $.Viewport.prototype = {
* @function * @function
* @param {OpenSeadragon.Point} delta * @param {OpenSeadragon.Point} delta
* @param {Boolean} immediately * @param {Boolean} immediately
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:pan * @fires OpenSeadragon.Viewer.event:pan
*/ */
panBy: function( delta, immediately ) { panBy: function( delta, immediately ) {
@ -830,7 +830,7 @@ $.Viewport.prototype = {
* @function * @function
* @param {OpenSeadragon.Point} center * @param {OpenSeadragon.Point} center
* @param {Boolean} immediately * @param {Boolean} immediately
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:pan * @fires OpenSeadragon.Viewer.event:pan
*/ */
panTo: function( center, immediately ) { panTo: function( center, immediately ) {
@ -865,7 +865,7 @@ $.Viewport.prototype = {
/** /**
* @function * @function
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:zoom * @fires OpenSeadragon.Viewer.event:zoom
*/ */
zoomBy: function(factor, refPoint, immediately) { zoomBy: function(factor, refPoint, immediately) {
@ -880,7 +880,7 @@ $.Viewport.prototype = {
* @param {OpenSeadragon.Point} [refPoint] The point which will stay at * @param {OpenSeadragon.Point} [refPoint] The point which will stay at
* the same screen location. Defaults to the viewport center. * the same screen location. Defaults to the viewport center.
* @param {Boolean} [immediately=false] * @param {Boolean} [immediately=false]
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:zoom * @fires OpenSeadragon.Viewer.event:zoom
*/ */
zoomTo: function(zoom, refPoint, immediately) { zoomTo: function(zoom, refPoint, immediately) {
@ -929,7 +929,7 @@ $.Viewport.prototype = {
* @param {Number} degrees The degrees to set the rotation to. * @param {Number} degrees The degrees to set the rotation to.
* @param {Boolean} [immediately=false] Whether to animate to the new angle * @param {Boolean} [immediately=false] Whether to animate to the new angle
* or rotate immediately. * or rotate immediately.
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
setRotation: function(degrees, immediately) { setRotation: function(degrees, immediately) {
if (!this.viewer || !this.viewer.drawer.canRotate()) { if (!this.viewer || !this.viewer.drawer.canRotate()) {
@ -980,7 +980,7 @@ $.Viewport.prototype = {
* Gets the current rotation in degrees. * Gets the current rotation in degrees.
* @function * @function
* @param {Boolean} [current=false] True for current rotation, false for target. * @param {Boolean} [current=false] True for current rotation, false for target.
* @return {Number} The current rotation in degrees. * @returns {Number} The current rotation in degrees.
*/ */
getRotation: function(current) { getRotation: function(current) {
return current ? return current ?
@ -990,7 +990,7 @@ $.Viewport.prototype = {
/** /**
* @function * @function
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
* @fires OpenSeadragon.Viewer.event:resize * @fires OpenSeadragon.Viewer.event:resize
*/ */
resize: function( newContainerSize, maintain ) { resize: function( newContainerSize, maintain ) {
@ -1241,7 +1241,7 @@ $.Viewport.prototype = {
* @param {(OpenSeadragon.Point|Number)} viewerX either a point or the X * @param {(OpenSeadragon.Point|Number)} viewerX either a point or the X
* coordinate in viewport coordinate system. * coordinate in viewport coordinate system.
* @param {Number} [viewerY] Y coordinate in viewport coordinate system. * @param {Number} [viewerY] Y coordinate in viewport coordinate system.
* @return {OpenSeadragon.Point} a point representing the coordinates in the image. * @returns {OpenSeadragon.Point} a point representing the coordinates in the image.
*/ */
viewportToImageCoordinates: function(viewerX, viewerY) { viewportToImageCoordinates: function(viewerX, viewerY) {
if (viewerX instanceof $.Point) { if (viewerX instanceof $.Point) {
@ -1287,7 +1287,7 @@ $.Viewport.prototype = {
* @param {(OpenSeadragon.Point | Number)} imageX the point or the * @param {(OpenSeadragon.Point | Number)} imageX the point or the
* X coordinate in image coordinate system. * X coordinate in image coordinate system.
* @param {Number} [imageY] Y coordinate in image coordinate system. * @param {Number} [imageY] Y coordinate in image coordinate system.
* @return {OpenSeadragon.Point} a point representing the coordinates in the viewport. * @returns {OpenSeadragon.Point} a point representing the coordinates in the viewport.
*/ */
imageToViewportCoordinates: function(imageX, imageY) { imageToViewportCoordinates: function(imageX, imageY) {
if (imageX instanceof $.Point) { if (imageX instanceof $.Point) {
@ -1618,7 +1618,7 @@ $.Viewport.prototype = {
/** /**
* Toggles flip state and demands a new drawing on navigator and viewer objects. * Toggles flip state and demands a new drawing on navigator and viewer objects.
* @function * @function
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
toggleFlip: function() { toggleFlip: function() {
this.setFlip(!this.getFlip()); this.setFlip(!this.getFlip());
@ -1628,7 +1628,7 @@ $.Viewport.prototype = {
/** /**
* Get flip state stored on viewport. * Get flip state stored on viewport.
* @function * @function
* @return {Boolean} Flip state. * @returns {Boolean} Flip state.
*/ */
getFlip: function() { getFlip: function() {
return this.flipped; return this.flipped;
@ -1638,7 +1638,7 @@ $.Viewport.prototype = {
* Sets flip state according to the state input argument. * Sets flip state according to the state input argument.
* @function * @function
* @param {Boolean} state - Flip state to set. * @param {Boolean} state - Flip state to set.
* @return {OpenSeadragon.Viewport} Chainable. * @returns {OpenSeadragon.Viewport} Chainable.
*/ */
setFlip: function( state ) { setFlip: function( state ) {
if ( this.flipped === state ) { if ( this.flipped === state ) {

View File

@ -123,7 +123,7 @@
* @param {Object} data - the raw configuration * @param {Object} data - the raw configuration
* @param {String} url - the url the data was retrieved from if any. * @param {String} url - the url the data was retrieved from if any.
* @param {String} postData - HTTP POST data in k=v&k2=v2... form or null * @param {String} postData - HTTP POST data in k=v&k2=v2... form or null
* @return {Object} options - A dictionary of keyword arguments sufficient * @returns {Object} options - A dictionary of keyword arguments sufficient
* to configure this tile sources constructor. * to configure this tile sources constructor.
*/ */
configure: function(data, url, postData) { configure: function(data, url, postData) {