mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
00551e6c2b
commit
0e2f5d49ef
@ -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#
|
||||
*/
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 = [{
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 ) {
|
||||
|
@ -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.
|
||||
*/
|
||||
/**
|
||||
|
@ -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 );
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user