From 0e2f5d49efc58d42f90873b13e23ae8c4f12450d Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 1 Sep 2018 10:59:20 +0200 Subject: [PATCH 1/3] Fix some typos in comments (found by codespell) Signed-off-by: Stefan Weil --- src/buttongroup.js | 2 +- src/control.js | 2 +- src/drawer.js | 2 +- src/imagetilesource.js | 2 +- src/legacytilesource.js | 2 +- src/navigator.js | 4 ++-- src/openseadragon.js | 12 ++++++------ src/overlay.js | 2 +- src/point.js | 6 +++--- src/referencestrip.js | 2 +- src/tilesource.js | 4 ++-- src/viewer.js | 14 +++++++------- src/viewport.js | 2 +- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/buttongroup.js b/src/buttongroup.js index daee211c..f8b9c3ab 100644 --- a/src/buttongroup.js +++ b/src/buttongroup.js @@ -83,7 +83,7 @@ $.ButtonGroup = function( options ) { $.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 * @memberof OpenSeadragon.ButtonGroup# */ diff --git a/src/control.js b/src/control.js index 5a63c517..d91e6b89 100644 --- a/src/control.js +++ b/src/control.js @@ -167,7 +167,7 @@ $.Control.prototype = { /** * Determines if the control is currently visible. * @function - * @return {Boolean} true if currenly visible, false otherwise. + * @return {Boolean} true if currently visible, false otherwise. */ isVisible: function() { return this.wrapper.style.display != "none"; diff --git a/src/drawer.js b/src/drawer.js index f3ecada4..7c4852cb 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -48,7 +48,7 @@ $.Drawer = function( options ) { $.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 var args = arguments; diff --git a/src/imagetilesource.js b/src/imagetilesource.js index 417243c6..e176576f 100644 --- a/src/imagetilesource.js +++ b/src/imagetilesource.js @@ -198,7 +198,7 @@ // 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). _buildLevels: function () { var levels = [{ diff --git a/src/legacytilesource.js b/src/legacytilesource.js index e24dbbe6..3defe342 100644 --- a/src/legacytilesource.js +++ b/src/legacytilesource.js @@ -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. * @private * @inner diff --git a/src/navigator.js b/src/navigator.js index c1bfc6f1..115d052d 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -152,7 +152,7 @@ $.Navigator = function( options ){ style.border = borderWidth + 'px solid ' + options.displayRegionColor; style.margin = '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*/} style.background = 'transparent'; @@ -571,7 +571,7 @@ function onCanvasScroll( event ) { 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 return false; } diff --git a/src/openseadragon.js b/src/openseadragon.js index 74851e94..af2dfca2 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -247,7 +247,7 @@ * 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 * 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] * A zoom percentage ( where 1 is 100% ) of the highest resolution level. @@ -441,7 +441,7 @@ * * @property {Number} [controlsFadeDelay=2000] * 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. * * @property {Number} [controlsFadeLength=1500] @@ -459,7 +459,7 @@ * @property {Number} [minPixelRatio=0.5] * The higher the minPixelRatio, the lower the quality of the image that * 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. * * @property {Boolean} [mouseNavEnabled=true] @@ -1343,7 +1343,7 @@ function OpenSeadragon( options ){ /** * Determines the position of the upper-left corner of the element. * @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. */ getElementPosition: function( element ) { @@ -2086,7 +2086,7 @@ function OpenSeadragon( options ){ /** * Similar to OpenSeadragon.delegate, but it does not immediately call * 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 * invocation, and each invocation can add additional arguments as well. * @@ -2614,7 +2614,7 @@ function OpenSeadragon( options ){ //TODO: $.console is often used inside a try/catch block which generally // prevents allowings errors to occur with detection until a debugger // 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. /** * A convenient alias for console when available, and a simple null diff --git a/src/overlay.js b/src/overlay.js index 9d9edd88..af22fa37 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -93,7 +93,7 @@ * Defines what part of the overlay should be at the specified options.location * @param {OpenSeadragon.Overlay.OnDrawCallback} [options.onDraw] * @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 * misalignment if the overlay size changes. * @param {Number} [options.width] The width of the overlay in viewport diff --git a/src/point.js b/src/point.js index 2d042416..7e55ec53 100644 --- a/src/point.js +++ b/src/point.js @@ -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 - * @param {OpenSeadragon.Point} point The point to substract vector components. - * @returns {OpenSeadragon.Point} A new point representing the substraction of the + * @param {OpenSeadragon.Point} point The point to subtract vector components. + * @returns {OpenSeadragon.Point} A new point representing the subtraction of the * vector components */ minus: function( point ) { diff --git a/src/referencestrip.js b/src/referencestrip.js index e1074572..62be61f8 100644 --- a/src/referencestrip.js +++ b/src/referencestrip.js @@ -53,7 +53,7 @@ var THIS = {}; * TODO: The difficult part of this feature is figuring out how to express * this functionality as a combination of the functionality already * 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. */ /** diff --git a/src/tilesource.js b/src/tilesource.js index 3386675a..c568e480 100644 --- a/src/tilesource.js +++ b/src/tilesource.js @@ -113,7 +113,7 @@ $.TileSource = function( width, height, tileSize, tileOverlap, minLevel, maxLeve //by asynchronously fetching their configuration data. $.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 //set depending on the state of the readiness of this tile //source @@ -172,7 +172,7 @@ $.TileSource = function( width, height, tileSize, tileOverlap, minLevel, maxLeve } 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 this.aspectRatio = 1; this.dimensions = new $.Point( 10, 10 ); diff --git a/src/viewer.js b/src/viewer.js index 2adf8bb1..9be3e7fa 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -69,7 +69,7 @@ $.Viewer = function( options ) { 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 if( !$.isPlainObject( options ) ){ options = { @@ -912,7 +912,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, nodes, 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() ) { return this; } @@ -967,7 +967,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, bodyStyle.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 //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 @@ -1906,11 +1906,11 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, * is closed which include when changing page. * @method * @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 * all available options. * @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 * viewport which the location coordinates will be treated as relative * 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. * @method * @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 - * 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 * viewport which the location coordinates will be treated as relative * to. diff --git a/src/viewport.js b/src/viewport.js index dec8513f..3413dbc1 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -57,7 +57,7 @@ */ $.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 var args = arguments; if (args.length && args[0] instanceof $.Point) { From e3775acbe03b51af63ed705c9d3fb832f5986550 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 1 Sep 2018 14:34:14 +0200 Subject: [PATCH 2/3] Fix typo in comment Signed-off-by: Stefan Weil --- src/openseadragon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index af2dfca2..e3d9aed7 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -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 * @param {String} key * @returns {String} The value of the url parameter or null if no param matches. From 6ea7ec261d202a92ef2f141885b08bb0c4ac7322 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 1 Sep 2018 14:36:31 +0200 Subject: [PATCH 3/3] Fix more similar typos in comments Signed-off-by: Stefan Weil --- src/dzitilesource.js | 2 +- src/imagetilesource.js | 2 +- src/legacytilesource.js | 2 +- src/osmtilesource.js | 2 +- src/tmstilesource.js | 2 +- src/zoomifytilesource.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dzitilesource.js b/src/dzitilesource.js index ee862f0d..38d35b6c 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -123,7 +123,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead * * @function * @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 * to configure this tile sources constructor. */ diff --git a/src/imagetilesource.js b/src/imagetilesource.js index e176576f..375c65d6 100644 --- a/src/imagetilesource.js +++ b/src/imagetilesource.js @@ -88,7 +88,7 @@ * * @function * @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 * to configure this tile sources constructor. */ diff --git a/src/legacytilesource.js b/src/legacytilesource.js index 3defe342..67572346 100644 --- a/src/legacytilesource.js +++ b/src/legacytilesource.js @@ -121,7 +121,7 @@ $.extend( $.LegacyTileSource.prototype, $.TileSource.prototype, /** @lends OpenS * * @function * @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 * to configure this tile sources constructor. */ diff --git a/src/osmtilesource.js b/src/osmtilesource.js index cc3286bc..555e0a9f 100644 --- a/src/osmtilesource.js +++ b/src/osmtilesource.js @@ -121,7 +121,7 @@ $.extend( $.OsmTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead * * @function * @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 * to configure this tile sources constructor. */ diff --git a/src/tmstilesource.js b/src/tmstilesource.js index e7640b15..66b7755c 100644 --- a/src/tmstilesource.js +++ b/src/tmstilesource.js @@ -110,7 +110,7 @@ $.extend( $.TmsTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead * * @function * @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 * to configure this tile sources constructor. */ diff --git a/src/zoomifytilesource.js b/src/zoomifytilesource.js index a9f44ac2..6009d0c1 100644 --- a/src/zoomifytilesource.js +++ b/src/zoomifytilesource.js @@ -114,7 +114,7 @@ * * @function * @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 * to configure this tile sources constructor. */