OpenSeadragon Viewer Instance. Note the viewer instance
as well as OpenSeadragon namespace can (and is) extended with
additional classes and events.
todo add type definitions for OSD
- Source:
- See:
-
Events
background-image-swap
When background image changes (in non-stacked mode), this event fires.
Properties:
Name |
Type |
Description |
backgroundImageUrl |
string
|
A reference to the World which raised the event. |
prevBackgroundSetup |
Object
|
Previous image configuration. |
backgroundSetup |
Object
|
New image configuration. |
previousTiledImage |
OpenSeadragon.TiledImage
|
Old, Replaced TiledImage |
tiledImage |
OpenSeadragon.TiledImage
|
New TiledImage |
- Source:
before-canvas-reload
Fired before visualization is initialized and loaded.
- Source:
before-first-open
First loading of the viewer from a clean state.
- Source:
before-plugin-load
Before a request to plugin loading is processed at runtime.
Properties:
Name |
Type |
Description |
id |
string
|
plugin id |
- Source:
error-system
Raise event from instance. Instances that register as event source fire on themselves.
Properties:
Name |
Type |
Description |
originType |
string
|
`"module"`, `"plugin"` or other type of the source |
originId |
string
|
|
- Source:
error-user
Event to fire if you want to avoid explicit error handling,
recommended in modules where module should give plugin chance hande it.
The core fires an error dialog with provided message if not handled.
Properties:
Name |
Type |
Description |
originType: |
string
|
`"module"`, `"plugin"` or other type of the source |
originId: |
string
|
unique code component id, e.g. a plugin id |
code: |
string
|
unique error identifier, e.g. W_MY_MODULE_ERROR |
message: |
string
|
a brief description of the case |
preventDefault: |
boolean
|
if true, the core will not fire default event |
trace: |
*
|
optional data or context object, e.g. an error object from an exception caught |
- Source:
export-data
Event to export your data within the viewer lifecycle
Event handler can by asynchronous, the event can wait.
todo OSD v5.0 will support also async events
Properties:
Name |
Type |
Description |
setSerializedData |
function
|
callback to call,
accepts 'key' (unique) and 'data' (string) to call with your data when ready |
- Source:
key-up
Properties:
Name |
Type |
Description |
e |
KeyboardEvent
|
Properties
Name |
Type |
Description |
focusCanvas |
boolean
|
|
|
- Source:
keydown
Properties:
Name |
Type |
Description |
e |
KeyboardEvent
|
Properties
Name |
Type |
Description |
focusCanvas |
boolean
|
|
|
- Source:
module-loaded
Module loaded event. Fired only with dynamic loading.
Properties:
Name |
Type |
Description |
id |
string
|
module id |
- Source:
open
Manual OpenSeadragon open event firing, see OpenSeadragon.Viewer#open
It is guaranteed to be called upon app start.
- Source:
plugin-failed
Properties:
Name |
Type |
Description |
id |
string
|
plugin id |
message |
string
|
|
- Source:
plugin-failed
Properties:
Name |
Type |
Description |
id |
string
|
plugin id |
message |
string
|
|
- Source:
plugin-failed
Properties:
Name |
Type |
Description |
id |
string
|
plugin id |
message |
string
|
|
- Source:
plugin-loaded
Plugin was loaded dynamically at runtime.
Properties:
Name |
Type |
Description |
id |
string
|
plugin id |
- Source:
tiled-image-created
Fired before visualization is initialized and loaded.
Properties:
Name |
Type |
Description |
item |
OpenSeadragon.TiledImage
|
|
url |
string
|
used to create the item |
index |
number
|
TiledImage index |
- Source:
tiled-image-problematic
The Viewer might decide to remove faulty TiledImage automatically.
The removal is not done automatically, but this event is fired.
The owner is recommended to remove the tiled image instance.
Properties:
Name |
Type |
Description |
e |
TiledImage
|
|
- Source:
visualization-redrawn
Fired when visualization is updated (re-rendered), which might happen quite often.
- Source:
visualization-used
Fired when visualization goal is set up and run, but before first rendering occurs.
Properties:
Name |
Type |
Description |
visualization |
|
visualization configuration used |
- Source:
warn-system
Raise event from instance. Instances that register as event source fire on themselves.
Properties:
Name |
Type |
Description |
originType |
string
|
`"module"`, `"plugin"` or other type of the source |
originId |
string
|
|
- Source:
warn-user
Event to fire if you want to avoid explicit warning handling,
recommended in modules where module should give plugin chance hande it.
The core fires a dialog with provided message if not handled.
Properties:
Name |
Type |
Description |
originType: |
string
|
`"module"`, `"plugin"` or other type of the source |
originId: |
string
|
unique code component id, e.g. a plugin id |
code: |
string
|
unique error identifier, e.g. W_MY_MODULE_ERROR |
message: |
string
|
a brief description of the case |
preventDefault: |
boolean
|
if true, the core will not fire default event |
trace: |
*
|
optional data or context object, e.g. an error object from an exception caught |
- Source: