Namespace: OpenSeadragon

OpenSeadragon

The root namespace for OpenSeadragon. All utility methods and classes are defined on or below this namespace.
Version:
  • openseadragon 2.3.0
Source:

Members

(static) Browser :Object

The current browser vendor, version, and related information regarding detected features.
Type:
  • Object
Properties:
Name Type Description
vendor OpenSeadragon.BROWSERS One of the OpenSeadragon.BROWSERS enumeration values.
version Number
alpha Boolean Does the browser support image alpha transparency.
Source:

(static) BROWSERS :Object

An enumeration of Browser vendors.
Type:
  • Object
Properties:
Name Type Description
UNKNOWN Number
IE Number
FIREFOX Number
SAFARI Number
CHROME Number
OPERA Number
Source:

(static) ButtonState :Object

An enumeration of button states
Type:
  • Object
Properties:
Name Type Description
REST Number
GROUP Number
HOVER Number
DOWN Number
Source:

(static) ControlAnchor :Object

An enumeration of supported locations where controls can be anchored. The anchoring is always relative to the container.
Type:
  • Object
Properties:
Name Type Description
NONE Number
TOP_LEFT Number
TOP_RIGHT Number
BOTTOM_LEFT Number
BOTTOM_RIGHT Number
ABSOLUTE Number
Source:

(static) DEFAULT_SETTINGS :Object

The default values for the optional settings documented at OpenSeadragon.Options.
Type:
  • Object
Source:

(static) fullScreenApi :object

Determine native full screen support we can get from the browser.
Type:
  • object
Properties:
Name Type Description
supportsFullScreen Boolean Return true if full screen API is supported.
isFullScreen function Return true if currently in full screen mode.
getFullScreenElement function Return the element currently in full screen mode.
requestFullScreen function Make a request to go in full screen mode.
exitFullScreen function Make a request to exit full screen mode.
cancelFullScreen function Deprecated, use exitFullScreen instead.
fullScreenEventName String Event fired when the full screen mode change.
fullScreenErrorEventName String Event fired when a request to go in full screen mode failed.
Source:

(static, readonly) OverlayPlacement :Object

An enumeration of positions that an overlay may be assigned relative to the viewport. It is identical to OpenSeadragon.Placement but is kept for backward compatibility.
Type:
  • Object
Properties:
Name Type Description
CENTER Number
TOP_LEFT Number
TOP Number
TOP_RIGHT Number
RIGHT Number
BOTTOM_RIGHT Number
BOTTOM Number
BOTTOM_LEFT Number
LEFT Number
Source:
See:

(static, readonly) OverlayRotationMode

An enumeration of possible ways to handle overlays rotation
Properties:
Name Type Description
NO_ROTATION Number The overlay ignore the viewport rotation.
EXACT Number The overlay use CSS 3 transforms to rotate with the viewport. If the overlay contains text, it will get rotated as well.
BOUNDING_BOX Number The overlay adjusts for rotation by taking the size of the bounding box of the rotated bounds. Only valid for overlays with Rect location and scalable in both directions.
Source:

(static) pixelDensityRatio :Number

A ratio comparing the device screen's pixel density to the canvas's backing store pixel density, clamped to a minimum of 1. Defaults to 1 if canvas isn't supported by the browser.
Type:
  • Number
Source:

(static, readonly) Placement

An enumeration of positions to anchor an element.
Properties:
Name Type Description
CENTER OpenSeadragon.Placement
TOP_LEFT OpenSeadragon.Placement
TOP OpenSeadragon.Placement
TOP_RIGHT OpenSeadragon.Placement
RIGHT OpenSeadragon.Placement
BOTTOM_RIGHT OpenSeadragon.Placement
BOTTOM OpenSeadragon.Placement
BOTTOM_LEFT OpenSeadragon.Placement
LEFT OpenSeadragon.Placement
Source:

(static) supportsCanvas :Boolean

True if the browser supports the HTML5 canvas element
Type:
  • Boolean
Source:

(static) version :Object

The OpenSeadragon version.
Type:
  • Object
Properties:
Name Type Description
versionStr String The version number as a string ('major.minor.revision').
major Number The major version number.
minor Number The minor version number.
revision Number The revision number.
Since:
  • 1.0.0
Source:

Methods

(static) addClass(element, className)

Add the specified CSS class to the element if not present.
Parameters:
Name Type Description
element Element | String
className String
Source:

(static) addEvent(element, eventName, handler, useCaptureopt)

Adds an event listener for the given element, eventName and handler.
Parameters:
Name Type Attributes Description
element Element | String
eventName String
handler function
useCapture Boolean <optional>
Source:

(static) cancelEvent(eventopt)

Cancels the default browser behavior had the event propagated all the way up the DOM to the window object.
Parameters:
Name Type Attributes Description
event Event <optional>
Source:

(static) capitalizeFirstLetter(string) → {String}

Capitalizes the first letter of a string
Parameters:
Name Type Description
string String
Source:
Returns:
The string with the first letter capitalized
Type
String

(static) createCallback(object, method, argsopt) → {function}

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 to be passed during construction which will be added during each invocation, and each invocation can add additional arguments as well.
Parameters:
Name Type Attributes Description
object Object
method function
args <optional>
any additional arguments are passed as arguments to the created callback
Source:
Returns:
Type
function

(static) createFromDZI()

Fully deprecated. Will throw an error.
Deprecated:
Source:

(static) delegate(object, method) → {function}

Returns a function which invokes the method as if it were a method belonging to the object.
Parameters:
Name Type Description
object Object
method function
Source:
Returns:
Type
function

(static) extend()

Taken from jQuery 1.6.1
Source:
See:

(static) getCssPropertyWithVendorPrefix(property) → {String}

Returns the property with the correct vendor prefix appended.
Parameters:
Name Type Description
property String the property name
Source:
Returns:
the property with the correct prefix or null if not supported.
Type
String

(static) getElement(element) → {Element}

Returns a DOM Element for the given id or element.
Parameters:
Name Type Description
element String | Element Accepts an id or element.
Source:
Returns:
The element with the given id, null, or the element itself.
Type
Element

(static) getElementOffset(element) → {OpenSeadragon.Point}

Determines the position of the upper-left corner of the element adjusted for current page and/or element scroll.
Parameters:
Name Type Description
element Element | String the element we want the position for.
Source:
Returns:
- the position of the upper left corner of the element adjusted for current page and/or element scroll.
Type
OpenSeadragon.Point

(static) getElementPosition(element) → {OpenSeadragon.Point}

Determines the position of the upper-left corner of the element.
Parameters:
Name Type Description
element Element | String the elemenet we want the position for.
Source:
Returns:
- the position of the upper left corner of the element.
Type
OpenSeadragon.Point

(static) getElementSize(element) → {OpenSeadragon.Point}

Determines the height and width of the given element.
Parameters:
Name Type Description
element Element | String
Source:
Returns:
Type
OpenSeadragon.Point

(static) getElementStyle(element) → {CSSStyle}

Returns the CSSStyle object for the given element.
Parameters:
Name Type Description
element Element | String
Source:
Returns:
Type
CSSStyle

(static) getMousePosition(eventopt) → {OpenSeadragon.Point}

Gets the position of the mouse on the screen for a given event.
Parameters:
Name Type Attributes Description
event Event <optional>
Source:
Returns:
Type
OpenSeadragon.Point

(static) getPageScroll() → {OpenSeadragon.Point}

Determines the page's current scroll position.
Source:
Returns:
Type
OpenSeadragon.Point

(static) getString(property)

Parameters:
Name Type Description
property String
Source:

(static) getUrlParameter(key) → {String}

Retreives the value of a url parameter from the window.location string.
Parameters:
Name Type Description
key String
Source:
Returns:
The value of the url parameter or null if no param matches.
Type
String

(static) getWindowSize() → {OpenSeadragon.Point}

Determines the size of the browsers window.
Source:
Returns:
Type
OpenSeadragon.Point

(static) imageFormatSupported(extensionopt) → {Boolean}

Reports whether the image format is supported for tiling in this version.
Parameters:
Name Type Attributes Description
extension String <optional>
Source:
Returns:
Type
Boolean

(static) indexOf(array, searchElement, fromIndexopt) → {Number}

Find the first index at which an element is found in an array or -1 if not present. Code taken and adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Compatibility
Parameters:
Name Type Attributes Default Description
array Array The array from which to find the element
searchElement Object The element to find
fromIndex Number <optional>
0 Index to start research.
Source:
Returns:
The index of the element in the array.
Type
Number

(static) isArray()

Taken from jQuery 1.6.1
Source:
See:

(static) isEmptyObject()

Taken from jQuery 1.6.1
Source:
See:

(static) isFunction()

Taken from jQuery 1.6.1
Source:
See:

(static) isPlainObject()

Taken from jQuery 1.6.1
Source:
See:

(static) isWindow()

A crude way of determining if an object is a window. Taken from jQuery 1.6.1
Source:
See:

(static) jsonp(options)

Taken from jQuery 1.6.1
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
url String
callback function
param String <optional>
'callback' The name of the url parameter to request the jsonp provider with.
callbackName= String <optional>
The name of the callback to request the jsonp provider with.
Source:

(static) makeAjaxRequest(options) → {XMLHttpRequest}

Makes an AJAX request.
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
url String the url to request
success function a function to call on a successful response
error function a function to call on when an error occurs
headers Object headers to add to the AJAX request
responseType String the response type of the the AJAX request
withCredentials Boolean <optional>
false whether to set the XHR's withCredentials
Source:
Throws:
Error
Returns:
Type
XMLHttpRequest

(static) makeCenteredNode(element) → {Element}

Wraps the given element in a nest of divs so that the element can be easily centered using CSS tables
Parameters:
Name Type Description
element Element | String
Source:
Returns:
outermost wrapper element
Type
Element

(static) makeNeutralElement(tagName) → {Element}

Creates an easily positionable element of the given type that therefor serves as an excellent container element.
Parameters:
Name Type Description
tagName String
Source:
Returns:
Type
Element

(static) makeTransparentImage(src) → {Element}

Ensures an image is loaded correctly to support alpha transparency. Generally only IE has issues doing this correctly for formats like png.
Parameters:
Name Type Description
src String
Source:
Returns:
Type
Element

(static) now()

Returns the current milliseconds, using Date.now() if available
Source:

(static) parseJSON(string) → {Object}

Parses a JSON string into a Javascript object.
Parameters:
Name Type Description
string String
Source:
Returns:
Type
Object

(static) parseXml(string) → {Document}

Parses an XML string into a DOM Document.
Parameters:
Name Type Description
string String
Source:
Returns:
Type
Document

(static) pointInElement(element, point) → {Boolean}

Determines if a point is within the bounding rectangle of the given element (hit-test).
Parameters:
Name Type Description
element Element | String
point OpenSeadragon.Point
Source:
Returns:
Type
Boolean

(static) positiveModulo(number, modulo) → {Number}

Compute the modulo of a number but makes sure to always return a positive value.
Parameters:
Name Type Description
number Number the number to computes the modulo of
modulo Number the modulo
Source:
Returns:
the result of the modulo of number
Type
Number

(static) removeClass(element, className)

Remove the specified CSS class from the element.
Parameters:
Name Type Description
element Element | String
className String
Source:

(static) removeEvent(element, eventName, handler, useCaptureopt)

Remove a given event listener for the given element, event type and handler.
Parameters:
Name Type Attributes Description
element Element | String
eventName String
handler function
useCapture Boolean <optional>
Source:

(static) setElementOpacity(element, opacity, usesAlphaopt)

Sets the opacity of the specified element.
Parameters:
Name Type Attributes Description
element Element | String
opacity Number
usesAlpha Boolean <optional>
Source:

(static) setElementTouchActionNone(element)

Sets the specified element's touch-action style attribute to 'none'.
Parameters:
Name Type Description
element Element | String
Source:

(static) setPageScroll() → {OpenSeadragon.Point}

Set the page scroll position.
Source:
Returns:
Type
OpenSeadragon.Point

(static) setString(property, value)

Parameters:
Name Type Description
property String
value *
Source:

(static) stopEvent(eventopt)

Stops the propagation of the event up the DOM.
Parameters:
Name Type Attributes Description
event Event <optional>
Source:

(static) type()

Taken from jQuery 1.6.1
Source:
See:

Type Definitions

EventHandler(event)

Event handler method signature used by all OpenSeadragon events.
Parameters:
Name Type Description
event Object See individual events for event-specific properties.
Source:

GestureSettings

Settings for gestures generated by a pointer device.
Type:
  • Object
Properties:
Name Type Description
scrollToZoom Boolean Set to false to disable zooming on scroll gestures.
clickToZoom Boolean Set to false to disable zooming on click gestures.
dblClickToZoom Boolean Set to false to disable zooming on double-click gestures. Note: If set to true then clickToZoom should be set to false to prevent multiple zooms.
pinchToZoom Boolean Set to false to disable zooming on pinch gestures.
flickEnabled Boolean Set to false to disable the kinetic panning effect (flick) at the end of a drag gesture.
flickMinSpeed Number If flickEnabled is true, the minimum speed (in pixels-per-second) required to cause the kinetic panning effect (flick) at the end of a drag gesture.
flickMomentum Number If flickEnabled is true, a constant multiplied by the velocity to determine the distance of the kinetic panning effect (flick) at the end of a drag gesture. A larger value will make the flick feel "lighter", while a smaller value will make the flick feel "heavier". Note: springStiffness and animationTime also affect the "spring" used to stop the flick animation.
Source:

NavImages

The names for the image resources used for the image navigation buttons.
Type:
  • Object
Properties:
Name Type Description
zoomIn Object Images for the zoom-in button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
zoomOut Object Images for the zoom-out button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
home Object Images for the home button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
fullpage Object Images for the full-page button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
rotateleft Object Images for the rotate left button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
rotateright Object Images for the rotate right button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
previous Object Images for the previous button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
next Object Images for the next button.
Properties
Name Type Description
REST String
GROUP String
HOVER String
DOWN String
Source:

Options

All required and optional settings for instantiating a new instance of an OpenSeadragon image viewer.
Type:
  • Object
Properties:
Name Type Attributes Default Description
id String Id of the element to append the viewer's container element to. If not provided, the 'element' property must be provided. If both the element and id properties are specified, the viewer is appended to the element provided in the element property.
element Element The element to append the viewer's container element to. If not provided, the 'id' property must be provided. If both the element and id properties are specified, the viewer is appended to the element provided in the element property.
tileSources Array | String | function | Object <optional>
null Tile source(s) to open initially. This is a complex parameter; see OpenSeadragon.Viewer#open for details.
tabIndex Number <optional>
0 Tabbing order index to assign to the viewer element. Positive values are selected in increasing order. When tabIndex is 0 source order is used. A negative value omits the viewer from the tabbing order.
overlays Array Array of objects defining permanent overlays of the viewer. The overlays added via this option and later removed with OpenSeadragon.Viewer#removeOverlay will be added back when a new image is opened. To add overlays which can be definitively removed, one must use OpenSeadragon.Viewer#addOverlay If displaying a sequence of images, the overlays can be associated with a specific page by passing the overlays array to the page's tile source configuration. Expected properties: * x, y, (or px, py for pixel coordinates) to define the location. * width, height in point if using x,y or in pixels if using px,py. If width and height are specified, the overlay size is adjusted when zooming, otherwise the size stays the size of the content (or the size defined by CSS). * className to associate a class to the overlay * id to set the overlay element. If an element with this id already exists, it is reused, otherwise it is created. If not specified, a new element is created. * placement a string to define the relative position to the viewport. Only used if no width and height are specified. Default: 'TOP_LEFT'. See OpenSeadragon.Placement for possible values.
xmlPath String <optional>
null DEPRECATED. A relative path to load a DZI file from the server. Prefer the newer Options.tileSources.
prefixUrl String <optional>
'/images/' Prepends the prefixUrl to navImages paths, which is very useful since the default paths are rarely useful for production environments.
navImages OpenSeadragon.NavImages <optional>
An object with a property for each button or other built-in navigation control, eg the current 'zoomIn', 'zoomOut', 'home', and 'fullpage'. Each of those in turn provides an image path for each state of the button or navigation control, eg 'REST', 'GROUP', 'HOVER', 'PRESS'. Finally the image paths, by default assume there is a folder on the servers root path called '/images', eg '/images/zoomin_rest.png'. If you need to adjust these paths, prefer setting the option.prefixUrl rather than overriding every image path directly through this setting.
debugMode Boolean <optional>
false TODO: provide an in-screen panel providing event detail feedback.
debugGridColor String <optional>
'#437AB2'
blendTime Number <optional>
0 Specifies the duration of animation as higher or lower level tiles are replacing the existing tile.
alwaysBlend Boolean <optional>
false Forces the tile to always blend. By default the tiles skip blending when the blendTime is surpassed and the current animation frame would not complete the blend.
autoHideControls Boolean <optional>
true If the user stops interacting with the viewport, fade the navigation controls. Useful for presentation since the controls are by default floated on top of the image the user is viewing.
immediateRender Boolean <optional>
false Render the best closest level first, ignoring the lowering levels which provide the effect of very blurry to sharp. It is recommended to change setting to true for mobile devices.
defaultZoomLevel Number <optional>
0 Zoom level to use when image is first opened or the home button is clicked. If 0, adjusts to fit viewer.
opacity Number <optional>
1 Default proportional opacity of the tiled images (1=opaque, 0=hidden) Hidden images do not draw and only load when preloading is allowed.
preload Boolean <optional>
false Default switch for loading hidden images (true loads, false blocks)
compositeOperation String <optional>
null Valid values are 'source-over', 'source-atop', 'source-in', 'source-out', 'destination-over', 'destination-atop', 'destination-in', 'destination-out', 'lighter', 'copy' or 'xor'
placeholderFillStyle String | CanvasGradient | CanvasPattern | function <optional>
null Draws a colored rectangle behind the tile if it is not loaded yet. You can pass a CSS color value like "#FF8800". When passing a function the tiledImage and canvas context are available as argument which is useful when you draw a gradient or pattern.
degrees Number <optional>
0 Initial rotation.
minZoomLevel Number <optional>
null
maxZoomLevel Number <optional>
null
homeFillsViewer Boolean <optional>
false Make the 'home' button fill the viewer and clip the image, instead of fitting the image to the viewer and letterboxing.
panHorizontal Boolean <optional>
true Allow horizontal pan.
panVertical Boolean <optional>
true Allow vertical pan.
constrainDuringPan Boolean <optional>
false
wrapHorizontal Boolean <optional>
false Set to true to force the image to wrap horizontally within the viewport. Useful for maps or images representing the surface of a sphere or cylinder.
wrapVertical Boolean <optional>
false Set to true to force the image to wrap vertically within the viewport. Useful for maps or images representing the surface of a sphere or cylinder.
minZoomImageRatio Number <optional>
0.9 The minimum percentage ( expressed as a number between 0 and 1 ) of the viewport height or width at which the zoom out will be constrained. Setting it to 0, for example will allow you to zoom out infinity.
maxZoomPixelRatio Number <optional>
1.1 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.
smoothTileEdgesMinZoom Number <optional>
1.1 A zoom percentage ( where 1 is 100% ) of the highest resolution level. When zoomed in beyond this value alternative compositing will be used to smooth out the edges between tiles. This will have a performance impact. Can be set to Infinity to turn it off. Note: This setting is ignored on iOS devices due to a known bug (See https://github.com/openseadragon/openseadragon/issues/952)
iOSDevice Boolean <optional>
? True if running on an iOS device, false otherwise. Used to disable certain features that behave differently on iOS devices.
autoResize Boolean <optional>
true Set to false to prevent polling for viewer size changes. Useful for providing custom resize behavior.
preserveImageSizeOnResize Boolean <optional>
false Set to true to have the image size preserved when the viewer is resized. This requires autoResize=true (default).
minScrollDeltaTime Number <optional>
50 Number of milliseconds between canvas-scroll events. This value helps normalize the rate of canvas-scroll events between different devices, causing the faster devices to slow down enough to make the zoom control more manageable.
pixelsPerWheelLine Number <optional>
40 For pixel-resolution scrolling devices, the number of pixels equal to one scroll line.
visibilityRatio Number <optional>
0.5 The percentage ( as a number from 0 to 1 ) of the source image which must be kept within the viewport. If the image is dragged beyond that limit, it will 'bounce' back until the minimum visibility ratio is achieved. Setting this to 0 and wrapHorizontal ( or wrapVertical ) to true will provide the effect of an infinitely scrolling viewport.
viewportMargins Object <optional>
{} Pushes the "home" region in from the sides by the specified amounts. Possible subproperties (Numbers, in screen coordinates): left, top, right, bottom.
imageLoaderLimit Number <optional>
0 The maximum number of image requests to make concurrently. By default it is set to 0 allowing the browser to make the maximum number of image requests in parallel as allowed by the browsers policy.
clickTimeThreshold Number <optional>
300 The number of milliseconds within which a pointer down-up event combination will be treated as a click gesture.
clickDistThreshold Number <optional>
5 The maximum distance allowed between a pointer down event and a pointer up event to be treated as a click gesture.
dblClickTimeThreshold Number <optional>
300 The number of milliseconds within which two pointer down-up event combinations will be treated as a double-click gesture.
dblClickDistThreshold Number <optional>
20 The maximum distance allowed between two pointer click events to be treated as a double-click gesture.
springStiffness Number <optional>
6.5
animationTime Number <optional>
1.2 Specifies the animation duration per each OpenSeadragon.Spring which occur when the image is dragged or zoomed.
gestureSettingsMouse OpenSeadragon.GestureSettings <optional>
Settings for gestures generated by a mouse pointer device. (See OpenSeadragon.GestureSettings)
Properties
Name Type Attributes Default Description
scrollToZoom Boolean <optional>
true Zoom on scroll gesture
clickToZoom Boolean <optional>
true Zoom on click gesture
dblClickToZoom Boolean <optional>
false Zoom on double-click gesture. Note: If set to true then clickToZoom should be set to false to prevent multiple zooms.
pinchToZoom Boolean <optional>
false Zoom on pinch gesture
flickEnabled Boolean <optional>
false Enable flick gesture
flickMinSpeed Number <optional>
120 If flickEnabled is true, the minimum speed to initiate a flick gesture (pixels-per-second)
flickMomentum Number <optional>
0.25 If flickEnabled is true, the momentum factor for the flick gesture
pinchRotate Boolean <optional>
false If pinchRotate is true, the user will have the ability to rotate the image using their fingers.
gestureSettingsTouch OpenSeadragon.GestureSettings <optional>
Settings for gestures generated by a touch pointer device. (See OpenSeadragon.GestureSettings)
Properties
Name Type Attributes Default Description
scrollToZoom Boolean <optional>
false Zoom on scroll gesture
clickToZoom Boolean <optional>
false Zoom on click gesture
dblClickToZoom Boolean <optional>
true Zoom on double-click gesture. Note: If set to true then clickToZoom should be set to false to prevent multiple zooms.
pinchToZoom Boolean <optional>
true Zoom on pinch gesture
flickEnabled Boolean <optional>
true Enable flick gesture
flickMinSpeed Number <optional>
120 If flickEnabled is true, the minimum speed to initiate a flick gesture (pixels-per-second)
flickMomentum Number <optional>
0.25 If flickEnabled is true, the momentum factor for the flick gesture
pinchRotate Boolean <optional>
false If pinchRotate is true, the user will have the ability to rotate the image using their fingers.
gestureSettingsPen OpenSeadragon.GestureSettings <optional>
Settings for gestures generated by a pen pointer device. (See OpenSeadragon.GestureSettings)
Properties
Name Type Attributes Default Description
scrollToZoom Boolean <optional>
false Zoom on scroll gesture
clickToZoom Boolean <optional>
true Zoom on click gesture
dblClickToZoom Boolean <optional>
false Zoom on double-click gesture. Note: If set to true then clickToZoom should be set to false to prevent multiple zooms.
pinchToZoom Boolean <optional>
false Zoom on pinch gesture
flickEnabled Boolean <optional>
false Enable flick gesture
flickMinSpeed Number <optional>
120 If flickEnabled is true, the minimum speed to initiate a flick gesture (pixels-per-second)
flickMomentum Number <optional>
0.25 If flickEnabled is true, the momentum factor for the flick gesture
pinchRotate Boolean <optional>
false If pinchRotate is true, the user will have the ability to rotate the image using their fingers.
gestureSettingsUnknown OpenSeadragon.GestureSettings <optional>
Settings for gestures generated by unknown pointer devices. (See OpenSeadragon.GestureSettings)
Properties
Name Type Attributes Default Description
scrollToZoom Boolean <optional>
true Zoom on scroll gesture
clickToZoom Boolean <optional>
false Zoom on click gesture
dblClickToZoom Boolean <optional>
true Zoom on double-click gesture. Note: If set to true then clickToZoom should be set to false to prevent multiple zooms.
pinchToZoom Boolean <optional>
true Zoom on pinch gesture
flickEnabled Boolean <optional>
true Enable flick gesture
flickMinSpeed Number <optional>
120 If flickEnabled is true, the minimum speed to initiate a flick gesture (pixels-per-second)
flickMomentum Number <optional>
0.25 If flickEnabled is true, the momentum factor for the flick gesture
pinchRotate Boolean <optional>
false If pinchRotate is true, the user will have the ability to rotate the image using their fingers.
zoomPerClick Number <optional>
2.0 The "zoom distance" per mouse click or touch tap. Note: Setting this to 1.0 effectively disables the click-to-zoom feature (also see gestureSettings[Mouse|Touch|Pen].clickToZoom/dblClickToZoom).
zoomPerScroll Number <optional>
1.2 The "zoom distance" per mouse scroll or touch pinch. Note: Setting this to 1.0 effectively disables the mouse-wheel zoom feature (also see gestureSettings[Mouse|Touch|Pen].scrollToZoom}).
zoomPerSecond Number <optional>
1.0 The number of seconds to animate a single zoom event over.
showNavigator Boolean <optional>
false Set to true to make the navigator minimap appear.
navigatorId String <optional>
navigator-GENERATED DATE The ID of a div to hold the navigator minimap. If an ID is specified, the navigatorPosition, navigatorSizeRatio, navigatorMaintainSizeRatio, navigator[Top|Left|Height|Width] and navigatorAutoFade options will be ignored. If an ID is not specified, a div element will be generated and placed on top of the main image.
navigatorPosition String <optional>
'TOP_RIGHT' Valid values are 'TOP_LEFT', 'TOP_RIGHT', 'BOTTOM_LEFT', 'BOTTOM_RIGHT', or 'ABSOLUTE'.
If 'ABSOLUTE' is specified, then navigator[Top|Left|Height|Width] determines the size and position of the navigator minimap in the viewer, and navigatorSizeRatio and navigatorMaintainSizeRatio are ignored.
For 'TOP_LEFT', 'TOP_RIGHT', 'BOTTOM_LEFT', and 'BOTTOM_RIGHT', the navigatorSizeRatio or navigator[Height|Width] values determine the size of the navigator minimap.
navigatorSizeRatio Number <optional>
0.2 Ratio of navigator size to viewer size. Ignored if navigator[Height|Width] are specified.
navigatorMaintainSizeRatio Boolean <optional>
false If true, the navigator minimap is resized (using navigatorSizeRatio) when the viewer size changes.
navigatorTop Number | String <optional>
null Specifies the location of the navigator minimap (see navigatorPosition).
navigatorLeft Number | String <optional>
null Specifies the location of the navigator minimap (see navigatorPosition).
navigatorHeight Number | String <optional>
null Specifies the size of the navigator minimap (see navigatorPosition). If specified, navigatorSizeRatio and navigatorMaintainSizeRatio are ignored.
navigatorWidth Number | String <optional>
null Specifies the size of the navigator minimap (see navigatorPosition). If specified, navigatorSizeRatio and navigatorMaintainSizeRatio are ignored.
navigatorAutoResize Boolean <optional>
true Set to false to prevent polling for navigator size changes. Useful for providing custom resize behavior. Setting to false can also improve performance when the navigator is configured to a fixed size.
navigatorAutoFade Boolean <optional>
true If the user stops interacting with the viewport, fade the navigator minimap. Setting to false will make the navigator minimap always visible.
navigatorRotate Boolean <optional>
true If true, the navigator will be rotated together with the viewer.
controlsFadeDelay Number <optional>
2000 The number of milliseconds to wait once the user has stopped interacting with the interface before begining to fade the controls. Assumes showNavigationControl and autoHideControls are both true.
controlsFadeLength Number <optional>
1500 The number of milliseconds to animate the controls fading out.
maxImageCacheCount Number <optional>
200 The max number of images we should keep in memory (per drawer).
timeout Number <optional>
30000 The max number of milliseconds that an image job may take to complete.
useCanvas Boolean <optional>
true Set to false to not use an HTML canvas element for image rendering even if canvas is supported.
minPixelRatio Number <optional>
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 try setting this to 1.5 or higher.
mouseNavEnabled Boolean <optional>
true Is the user able to interact with the image via mouse or touch. Default interactions include draging the image in a plane, and zooming in toward and away from the image.
showNavigationControl Boolean <optional>
true Set to false to prevent the appearance of the default navigation controls.
Note that if set to false, the customs buttons set by the options zoomInButton, zoomOutButton etc, are rendered inactive.
navigationControlAnchor OpenSeadragon.ControlAnchor <optional>
TOP_LEFT Placement of the default navigation controls. To set the placement of the sequence controls, see the sequenceControlAnchor option.
showZoomControl Boolean <optional>
true If true then + and - buttons to zoom in and out are displayed.
Note: OpenSeadragon.Options.showNavigationControl is overriding this setting when set to false.
showHomeControl Boolean <optional>
true If true then the 'Go home' button is displayed to go back to the original zoom and pan.
Note: OpenSeadragon.Options.showNavigationControl is overriding this setting when set to false.
showFullPageControl Boolean <optional>
true If true then the 'Toggle full page' button is displayed to switch between full page and normal mode.
Note: OpenSeadragon.Options.showNavigationControl is overriding this setting when set to false.
showRotationControl Boolean <optional>
false If true then the rotate left/right controls will be displayed as part of the standard controls. This is also subject to the browser support for rotate (e.g. viewer.drawer.canRotate()).
Note: OpenSeadragon.Options.showNavigationControl is overriding this setting when set to false.
showSequenceControl Boolean <optional>
true If sequenceMode is true, then provide buttons for navigating forward and backward through the images.
sequenceControlAnchor OpenSeadragon.ControlAnchor <optional>
TOP_LEFT Placement of the default sequence controls.
navPrevNextWrap Boolean <optional>
false If true then the 'previous' button will wrap to the last image when viewing the first image and the 'next' button will wrap to the first image when viewing the last image.
zoomInButton String Set the id of the custom 'Zoom in' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
zoomOutButton String Set the id of the custom 'Zoom out' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
homeButton String Set the id of the custom 'Go home' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
fullPageButton String Set the id of the custom 'Toggle full page' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
rotateLeftButton String Set the id of the custom 'Rotate left' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
rotateRightButton String Set the id of the custom 'Rotate right' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
previousButton String Set the id of the custom 'Previous page' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
nextButton String Set the id of the custom 'Next page' button to use. This is useful to have a custom button anywhere in the web page.
To only change the button images, consider using OpenSeadragon.Options.navImages
sequenceMode Boolean <optional>
false Set to true to have the viewer treat your tilesources as a sequence of images to be opened one at a time rather than all at once.
initialPage Number <optional>
0 If sequenceMode is true, display this page initially.
preserveViewport Boolean <optional>
false If sequenceMode is true, then normally navigating through each image resets the viewport to 'home' position. If preserveViewport is set to true, then the viewport position is preserved when navigating between images in the sequence.
preserveOverlays Boolean <optional>
false If sequenceMode is true, then normally navigating through each image resets the overlays. If preserveOverlays is set to true, then the overlays added with OpenSeadragon.Viewer#addOverlay are preserved when navigating between images in the sequence. Note: setting preserveOverlays overrides any overlays specified in the global "overlays" option for the Viewer. It's also not compatible with specifying per-tileSource overlays via the options, as those overlays will persist even after the tileSource is closed.
showReferenceStrip Boolean <optional>
false If sequenceMode is true, then display a scrolling strip of image thumbnails for navigating through the images.
referenceStripScroll String <optional>
'horizontal'
referenceStripElement Element <optional>
null
referenceStripHeight Number <optional>
null
referenceStripWidth Number <optional>
null
referenceStripPosition String <optional>
'BOTTOM_LEFT'
referenceStripSizeRatio Number <optional>
0.2
collectionMode Boolean <optional>
false Set to true to have the viewer arrange your TiledImages in a grid or line.
collectionRows Number <optional>
3 If collectionMode is true, specifies how many rows the grid should have. Use 1 to make a line. If collectionLayout is 'vertical', specifies how many columns instead.
collectionColumns Number <optional>
0 If collectionMode is true, specifies how many columns the grid should have. Use 1 to make a line. If collectionLayout is 'vertical', specifies how many rows instead. Ignored if collectionRows is not set to a falsy value.
collectionLayout String <optional>
'horizontal' If collectionMode is true, specifies whether to arrange vertically or horizontally.
collectionTileSize Number <optional>
800 If collectionMode is true, specifies the size, in viewport coordinates, for each TiledImage to fit into. The TiledImage will be centered within a square of the specified size.
collectionTileMargin Number <optional>
80 If collectionMode is true, specifies the margin, in viewport coordinates, between each TiledImage.
crossOriginPolicy String | Boolean <optional>
false Valid values are 'Anonymous', 'use-credentials', and false. If false, canvas requests will not use CORS, and the canvas will be tainted.
ajaxWithCredentials Boolean <optional>
false Whether to set the withCredentials XHR flag for AJAX requests. Note that this can be overridden at the OpenSeadragon.TileSource level.
loadTilesWithAjax Boolean <optional>
false Whether to load tile data using AJAX requests. Note that this can be overridden at the OpenSeadragon.TileSource level.
ajaxHeaders Object <optional>
{} A set of headers to include when making AJAX requests for tile sources or tiles.
Source: