mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Merge pull request #1529 from stweil/typos
Fix some typos in comments (found by codespell)
This commit is contained in:
commit
e72a60e5bc
@ -83,7 +83,7 @@ $.ButtonGroup = function( options ) {
|
|||||||
$.setElementTouchActionNone( this.element );
|
$.setElementTouchActionNone( this.element );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tracks mouse/touch/key events accross the group of buttons.
|
* Tracks mouse/touch/key events across the group of buttons.
|
||||||
* @member {OpenSeadragon.MouseTracker} tracker
|
* @member {OpenSeadragon.MouseTracker} tracker
|
||||||
* @memberof OpenSeadragon.ButtonGroup#
|
* @memberof OpenSeadragon.ButtonGroup#
|
||||||
*/
|
*/
|
||||||
|
@ -167,7 +167,7 @@ $.Control.prototype = {
|
|||||||
/**
|
/**
|
||||||
* Determines if the control is currently visible.
|
* Determines if the control is currently visible.
|
||||||
* @function
|
* @function
|
||||||
* @return {Boolean} true if currenly visible, false otherwise.
|
* @return {Boolean} true if currently visible, false otherwise.
|
||||||
*/
|
*/
|
||||||
isVisible: function() {
|
isVisible: function() {
|
||||||
return this.wrapper.style.display != "none";
|
return this.wrapper.style.display != "none";
|
||||||
|
@ -48,7 +48,7 @@ $.Drawer = function( options ) {
|
|||||||
|
|
||||||
$.console.assert( options.viewer, "[Drawer] options.viewer is required" );
|
$.console.assert( options.viewer, "[Drawer] options.viewer is required" );
|
||||||
|
|
||||||
//backward compatibility for positional args while prefering more
|
//backward compatibility for positional args while preferring more
|
||||||
//idiomatic javascript options object as the only argument
|
//idiomatic javascript options object as the only argument
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Object|XMLDocument} data - the raw configuration
|
* @param {Object|XMLDocument} data - the raw configuration
|
||||||
* @param {String} url - the url the data was retreived from if any.
|
* @param {String} url - the url the data was retrieved from if any.
|
||||||
* @return {Object} options - A dictionary of keyword arguments sufficient
|
* @return {Object} options - A dictionary of keyword arguments sufficient
|
||||||
* to configure this tile sources constructor.
|
* to configure this tile sources constructor.
|
||||||
*/
|
*/
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} options - the options
|
* @param {Object} options - the options
|
||||||
* @param {String} dataUrl - the url the image was retreived from, if any.
|
* @param {String} dataUrl - the url the image was retrieved from, if any.
|
||||||
* @return {Object} options - A dictionary of keyword arguments sufficient
|
* @return {Object} options - A dictionary of keyword arguments sufficient
|
||||||
* to configure this tile sources constructor.
|
* to configure this tile sources constructor.
|
||||||
*/
|
*/
|
||||||
@ -198,7 +198,7 @@
|
|||||||
|
|
||||||
// private
|
// private
|
||||||
//
|
//
|
||||||
// Builds the differents levels of the pyramid if possible
|
// Builds the different levels of the pyramid if possible
|
||||||
// (i.e. if canvas API enabled and no canvas tainting issue).
|
// (i.e. if canvas API enabled and no canvas tainting issue).
|
||||||
_buildLevels: function () {
|
_buildLevels: function () {
|
||||||
var levels = [{
|
var levels = [{
|
||||||
|
@ -121,7 +121,7 @@ $.extend( $.LegacyTileSource.prototype, $.TileSource.prototype, /** @lends OpenS
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Object|XMLDocument} configuration - the raw configuration
|
* @param {Object|XMLDocument} configuration - the raw configuration
|
||||||
* @param {String} dataUrl - the url the data was retreived from if any.
|
* @param {String} dataUrl - the url the data was retrieved from if any.
|
||||||
* @return {Object} options - A dictionary of keyword arguments sufficient
|
* @return {Object} options - A dictionary of keyword arguments sufficient
|
||||||
* to configure this tile sources constructor.
|
* to configure this tile sources constructor.
|
||||||
*/
|
*/
|
||||||
@ -190,7 +190,7 @@ $.extend( $.LegacyTileSource.prototype, $.TileSource.prototype, /** @lends OpenS
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method removes any files from the Array which dont conform to our
|
* This method removes any files from the Array which don't conform to our
|
||||||
* basic requirements for a 'level' in the LegacyTileSource.
|
* basic requirements for a 'level' in the LegacyTileSource.
|
||||||
* @private
|
* @private
|
||||||
* @inner
|
* @inner
|
||||||
|
@ -152,7 +152,7 @@ $.Navigator = function( options ){
|
|||||||
style.border = borderWidth + 'px solid ' + options.displayRegionColor;
|
style.border = borderWidth + 'px solid ' + options.displayRegionColor;
|
||||||
style.margin = '0px';
|
style.margin = '0px';
|
||||||
style.padding = '0px';
|
style.padding = '0px';
|
||||||
//TODO: IE doesnt like this property being set
|
//TODO: IE doesn't like this property being set
|
||||||
//try{ style.outline = '2px auto #909'; }catch(e){/*ignore*/}
|
//try{ style.outline = '2px auto #909'; }catch(e){/*ignore*/}
|
||||||
|
|
||||||
style.background = 'transparent';
|
style.background = 'transparent';
|
||||||
@ -571,7 +571,7 @@ function onCanvasScroll( event ) {
|
|||||||
originalEvent: event.originalEvent
|
originalEvent: event.originalEvent
|
||||||
});
|
});
|
||||||
|
|
||||||
//dont scroll the page up and down if the user is scrolling
|
//don't scroll the page up and down if the user is scrolling
|
||||||
//in the navigator
|
//in the navigator
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@
|
|||||||
* The maximum ratio to allow a zoom-in to affect the highest level pixel
|
* The maximum ratio to allow a zoom-in to affect the highest level pixel
|
||||||
* ratio. This can be set to Infinity to allow 'infinite' zooming into the
|
* ratio. This can be set to Infinity to allow 'infinite' zooming into the
|
||||||
* image though it is less effective visually if the HTML5 Canvas is not
|
* image though it is less effective visually if the HTML5 Canvas is not
|
||||||
* availble on the viewing device.
|
* available on the viewing device.
|
||||||
*
|
*
|
||||||
* @property {Number} [smoothTileEdgesMinZoom=1.1]
|
* @property {Number} [smoothTileEdgesMinZoom=1.1]
|
||||||
* A zoom percentage ( where 1 is 100% ) of the highest resolution level.
|
* A zoom percentage ( where 1 is 100% ) of the highest resolution level.
|
||||||
@ -441,7 +441,7 @@
|
|||||||
*
|
*
|
||||||
* @property {Number} [controlsFadeDelay=2000]
|
* @property {Number} [controlsFadeDelay=2000]
|
||||||
* The number of milliseconds to wait once the user has stopped interacting
|
* The number of milliseconds to wait once the user has stopped interacting
|
||||||
* with the interface before begining to fade the controls. Assumes
|
* with the interface before beginning to fade the controls. Assumes
|
||||||
* showNavigationControl and autoHideControls are both true.
|
* showNavigationControl and autoHideControls are both true.
|
||||||
*
|
*
|
||||||
* @property {Number} [controlsFadeLength=1500]
|
* @property {Number} [controlsFadeLength=1500]
|
||||||
@ -459,7 +459,7 @@
|
|||||||
* @property {Number} [minPixelRatio=0.5]
|
* @property {Number} [minPixelRatio=0.5]
|
||||||
* The higher the minPixelRatio, the lower the quality of the image that
|
* The higher the minPixelRatio, the lower the quality of the image that
|
||||||
* is considered sufficient to stop rendering a given zoom level. For
|
* is considered sufficient to stop rendering a given zoom level. For
|
||||||
* example, if you are targeting mobile devices with less bandwith you may
|
* example, if you are targeting mobile devices with less bandwidth you may
|
||||||
* try setting this to 1.5 or higher.
|
* try setting this to 1.5 or higher.
|
||||||
*
|
*
|
||||||
* @property {Boolean} [mouseNavEnabled=true]
|
* @property {Boolean} [mouseNavEnabled=true]
|
||||||
@ -1343,7 +1343,7 @@ function OpenSeadragon( options ){
|
|||||||
/**
|
/**
|
||||||
* Determines the position of the upper-left corner of the element.
|
* Determines the position of the upper-left corner of the element.
|
||||||
* @function
|
* @function
|
||||||
* @param {Element|String} element - the elemenet we want the position for.
|
* @param {Element|String} element - the element we want the position for.
|
||||||
* @returns {OpenSeadragon.Point} - the position of the upper left corner of the element.
|
* @returns {OpenSeadragon.Point} - the position of the upper left corner of the element.
|
||||||
*/
|
*/
|
||||||
getElementPosition: function( element ) {
|
getElementPosition: function( element ) {
|
||||||
@ -2086,7 +2086,7 @@ function OpenSeadragon( options ){
|
|||||||
/**
|
/**
|
||||||
* Similar to OpenSeadragon.delegate, but it does not immediately call
|
* Similar to OpenSeadragon.delegate, but it does not immediately call
|
||||||
* the method on the object, returning a function which can be called
|
* the method on the object, returning a function which can be called
|
||||||
* repeatedly to delegate the method. It also allows additonal arguments
|
* repeatedly to delegate the method. It also allows additional arguments
|
||||||
* to be passed during construction which will be added during each
|
* to be passed during construction which will be added during each
|
||||||
* invocation, and each invocation can add additional arguments as well.
|
* invocation, and each invocation can add additional arguments as well.
|
||||||
*
|
*
|
||||||
@ -2120,7 +2120,7 @@ function OpenSeadragon( options ){
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreives the value of a url parameter from the window.location string.
|
* Retrieves the value of a url parameter from the window.location string.
|
||||||
* @function
|
* @function
|
||||||
* @param {String} key
|
* @param {String} key
|
||||||
* @returns {String} The value of the url parameter or null if no param matches.
|
* @returns {String} The value of the url parameter or null if no param matches.
|
||||||
@ -2614,7 +2614,7 @@ function OpenSeadragon( options ){
|
|||||||
//TODO: $.console is often used inside a try/catch block which generally
|
//TODO: $.console is often used inside a try/catch block which generally
|
||||||
// prevents allowings errors to occur with detection until a debugger
|
// prevents allowings errors to occur with detection until a debugger
|
||||||
// is attached. Although I've been guilty of the same anti-pattern
|
// is attached. Although I've been guilty of the same anti-pattern
|
||||||
// I eventually was convinced that errors should naturally propogate in
|
// I eventually was convinced that errors should naturally propagate in
|
||||||
// all but the most special cases.
|
// all but the most special cases.
|
||||||
/**
|
/**
|
||||||
* A convenient alias for console when available, and a simple null
|
* A convenient alias for console when available, and a simple null
|
||||||
|
@ -121,7 +121,7 @@ $.extend( $.OsmTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} data - the raw configuration
|
* @param {Object} data - the raw configuration
|
||||||
* @param {String} url - the url the data was retreived from if any.
|
* @param {String} url - the url the data was retrieved from if any.
|
||||||
* @return {Object} options - A dictionary of keyword arguments sufficient
|
* @return {Object} options - A dictionary of keyword arguments sufficient
|
||||||
* to configure this tile sources constructor.
|
* to configure this tile sources constructor.
|
||||||
*/
|
*/
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
* Defines what part of the overlay should be at the specified options.location
|
* Defines what part of the overlay should be at the specified options.location
|
||||||
* @param {OpenSeadragon.Overlay.OnDrawCallback} [options.onDraw]
|
* @param {OpenSeadragon.Overlay.OnDrawCallback} [options.onDraw]
|
||||||
* @param {Boolean} [options.checkResize=true] Set to false to avoid to
|
* @param {Boolean} [options.checkResize=true] Set to false to avoid to
|
||||||
* check the size of the overlay everytime it is drawn in the directions
|
* check the size of the overlay every time it is drawn in the directions
|
||||||
* which are not scaled. It will improve performances but will cause a
|
* which are not scaled. It will improve performances but will cause a
|
||||||
* misalignment if the overlay size changes.
|
* misalignment if the overlay size changes.
|
||||||
* @param {Number} [options.width] The width of the overlay in viewport
|
* @param {Number} [options.width] The width of the overlay in viewport
|
||||||
|
@ -84,10 +84,10 @@ $.Point.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Substract another Point to this point and return a new Point.
|
* Subtract another Point to this point and return a new Point.
|
||||||
* @function
|
* @function
|
||||||
* @param {OpenSeadragon.Point} point The point to substract vector components.
|
* @param {OpenSeadragon.Point} point The point to subtract vector components.
|
||||||
* @returns {OpenSeadragon.Point} A new point representing the substraction of the
|
* @returns {OpenSeadragon.Point} A new point representing the subtraction of the
|
||||||
* vector components
|
* vector components
|
||||||
*/
|
*/
|
||||||
minus: function( point ) {
|
minus: function( point ) {
|
||||||
|
@ -53,7 +53,7 @@ var THIS = {};
|
|||||||
* TODO: The difficult part of this feature is figuring out how to express
|
* TODO: The difficult part of this feature is figuring out how to express
|
||||||
* this functionality as a combination of the functionality already
|
* this functionality as a combination of the functionality already
|
||||||
* provided by Drawer, Viewport, TileSource, and Navigator. It may
|
* provided by Drawer, Viewport, TileSource, and Navigator. It may
|
||||||
* require better abstraction at those points in order to effeciently
|
* require better abstraction at those points in order to efficiently
|
||||||
* reuse those paradigms.
|
* reuse those paradigms.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
|
@ -113,7 +113,7 @@ $.TileSource = function( width, height, tileSize, tileOverlap, minLevel, maxLeve
|
|||||||
//by asynchronously fetching their configuration data.
|
//by asynchronously fetching their configuration data.
|
||||||
$.EventSource.call( this );
|
$.EventSource.call( this );
|
||||||
|
|
||||||
//we allow options to override anything we dont treat as
|
//we allow options to override anything we don't treat as
|
||||||
//required via idiomatic options or which is functionally
|
//required via idiomatic options or which is functionally
|
||||||
//set depending on the state of the readiness of this tile
|
//set depending on the state of the readiness of this tile
|
||||||
//source
|
//source
|
||||||
@ -172,7 +172,7 @@ $.TileSource = function( width, height, tileSize, tileOverlap, minLevel, maxLeve
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.url) {
|
if (this.url) {
|
||||||
//in case the getImageInfo method is overriden and/or implies an
|
//in case the getImageInfo method is overridden and/or implies an
|
||||||
//async mechanism set some safe defaults first
|
//async mechanism set some safe defaults first
|
||||||
this.aspectRatio = 1;
|
this.aspectRatio = 1;
|
||||||
this.dimensions = new $.Point( 10, 10 );
|
this.dimensions = new $.Point( 10, 10 );
|
||||||
|
@ -110,7 +110,7 @@ $.extend( $.TmsTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} data - the raw configuration
|
* @param {Object} data - the raw configuration
|
||||||
* @param {String} url - the url the data was retreived from if any.
|
* @param {String} url - the url the data was retrieved from if any.
|
||||||
* @return {Object} options - A dictionary of keyword arguments sufficient
|
* @return {Object} options - A dictionary of keyword arguments sufficient
|
||||||
* to configure this tile sources constructor.
|
* to configure this tile sources constructor.
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ $.Viewer = function( options ) {
|
|||||||
i;
|
i;
|
||||||
|
|
||||||
|
|
||||||
//backward compatibility for positional args while prefering more
|
//backward compatibility for positional args while preferring more
|
||||||
//idiomatic javascript options object as the only argument
|
//idiomatic javascript options object as the only argument
|
||||||
if( !$.isPlainObject( options ) ){
|
if( !$.isPlainObject( options ) ){
|
||||||
options = {
|
options = {
|
||||||
@ -912,7 +912,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
nodes,
|
nodes,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
//dont bother modifying the DOM if we are already in full page mode.
|
//don't bother modifying the DOM if we are already in full page mode.
|
||||||
if ( fullPage == this.isFullPage() ) {
|
if ( fullPage == this.isFullPage() ) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -967,7 +967,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
bodyStyle.height = "100%";
|
bodyStyle.height = "100%";
|
||||||
docStyle.height = "100%";
|
docStyle.height = "100%";
|
||||||
|
|
||||||
//when entering full screen on the ipad it wasnt sufficient to leave
|
//when entering full screen on the ipad it wasn't sufficient to leave
|
||||||
//the body intact as only only the top half of the screen would
|
//the body intact as only only the top half of the screen would
|
||||||
//respond to touch events on the canvas, while the bottom half treated
|
//respond to touch events on the canvas, while the bottom half treated
|
||||||
//them as touch events on the document body. Thus we remove and store
|
//them as touch events on the document body. Thus we remove and store
|
||||||
@ -1906,11 +1906,11 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
* is closed which include when changing page.
|
* is closed which include when changing page.
|
||||||
* @method
|
* @method
|
||||||
* @param {Element|String|Object} element - A reference to an element or an id for
|
* @param {Element|String|Object} element - A reference to an element or an id for
|
||||||
* the element which will be overlayed. Or an Object specifying the configuration for the overlay.
|
* the element which will be overlaid. Or an Object specifying the configuration for the overlay.
|
||||||
* If using an object, see {@link OpenSeadragon.Overlay} for a list of
|
* If using an object, see {@link OpenSeadragon.Overlay} for a list of
|
||||||
* all available options.
|
* all available options.
|
||||||
* @param {OpenSeadragon.Point|OpenSeadragon.Rect} location - The point or
|
* @param {OpenSeadragon.Point|OpenSeadragon.Rect} location - The point or
|
||||||
* rectangle which will be overlayed. This is a viewport relative location.
|
* rectangle which will be overlaid. This is a viewport relative location.
|
||||||
* @param {OpenSeadragon.Placement} placement - The position of the
|
* @param {OpenSeadragon.Placement} placement - 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.
|
||||||
@ -1969,9 +1969,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
* element id moving it to the new location, relative to the new placement.
|
* element id moving it to the new location, relative to the new placement.
|
||||||
* @method
|
* @method
|
||||||
* @param {Element|String} element - A reference to an element or an id for
|
* @param {Element|String} element - A reference to an element or an id for
|
||||||
* the element which is overlayed.
|
* the element which is overlaid.
|
||||||
* @param {OpenSeadragon.Point|OpenSeadragon.Rect} location - The point or
|
* @param {OpenSeadragon.Point|OpenSeadragon.Rect} location - The point or
|
||||||
* rectangle which will be overlayed. This is a viewport relative location.
|
* rectangle which will be overlaid. This is a viewport relative location.
|
||||||
* @param {OpenSeadragon.Placement} placement - The position of the
|
* @param {OpenSeadragon.Placement} placement - 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.
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
*/
|
*/
|
||||||
$.Viewport = function( options ) {
|
$.Viewport = function( options ) {
|
||||||
|
|
||||||
//backward compatibility for positional args while prefering more
|
//backward compatibility for positional args while preferring more
|
||||||
//idiomatic javascript options object as the only argument
|
//idiomatic javascript options object as the only argument
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
if (args.length && args[0] instanceof $.Point) {
|
if (args.length && args[0] instanceof $.Point) {
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Object} data - the raw configuration
|
* @param {Object} data - the raw configuration
|
||||||
* @param {String} url - the url the data was retreived from if any.
|
* @param {String} url - the url the data was retrieved from if any.
|
||||||
* @return {Object} options - A dictionary of keyword arguments sufficient
|
* @return {Object} options - A dictionary of keyword arguments sufficient
|
||||||
* to configure this tile sources constructor.
|
* to configure this tile sources constructor.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user