Constructor
new SlideLoader(context, slideLoaderOptions)
- Source:
- Tutorials:
-
- Tutorial: 03-gallery
- Tutorial: 04-tree
- Tutorial: 05-annotations
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
context |
PMA.UI.Components.Context | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
slideLoaderOptions |
Object | Initialization options passed to each PMA.UI.View.Viewport that is created during a PMA.UI.Components.SlideLoader#load call. This is the same struct as the one accepted by the PMA.UI.View.Viewport constructor, omitting server URLs, credentials and specific slide paths. The omitted information is either available via the PMA.UI.Components.Context instance, or supplied during the PMA.UI.Components.SlideLoader#load call.
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options.magnifier |
Object | boolean |
<optional> |
false
|
Whether or not to show the magnifier control
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options.grid |
Object |
<optional> |
Options for measurement grid
Properties
|
Fires:
- PMA.UI.Components.Events#event:SlideInfoError
- PMA.UI.Components.Events#event:BeforeSlideLoad
- PMA.UI.Components.Events#event:SlideLoaded
- PMA.UI.Components.Events#event:BeforeDrop
Classes
Members
mainViewport
- Source:
The currently loaded PMA.UI.View.Viewport instance, or null
Methods
drawCollageAnnotations(serverUrl, slidePathTransform)
- Source:
Draw annotations for each slide in collage mode
Parameters:
Name | Type | Description |
---|---|---|
serverUrl |
string | The server used to load the images |
slidePathTransform |
function | A function to transform each filename to a slide name |
getLoadedImageInfo() → {object|null}
- Source:
Gets the image info of the currently loaded image
Returns:
- Type
- object | null
getOption(option, value) → {any}
- Source:
Gets the value of a viewer option.
Parameters:
Name | Type | Description |
---|---|---|
option |
string | |
value |
any |
Returns:
The value of the option or undefined
- Type
- any
listen(eventName, callback)
- Source:
Attaches an event listener
Parameters:
Name | Type | Description |
---|---|---|
eventName |
PMA.UI.Components.Events | The name of the event to listen to |
callback |
function | The function to call when the event occurs |
load(serverUrl, path, doneCbopt, droppedopt)
- Source:
Creates a PMA.UI.View.Viewport instance that loads the requested slide
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
serverUrl |
string | PMA.core server URL | |
path |
string | Path or UID of the slide load | |
doneCb |
function |
<optional> |
Called when the slide has finished loading |
dropped |
boolean |
<optional> |
Whether this slide was loaded by a drag and drop operation |
Fires:
- PMA.UI.Components.Events#event:BeforeSlideLoad
- PMA.UI.Components.Events#event:SlideLoaded
- PMA.UI.Components.Events#event:SlideInfoError
reloadAnnotations(readyCallbackopt)
- Source:
Reloads annotations from the server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
readyCallback |
function |
<optional> |
Called when the annotations have finished loading |
setOption(option, value)
- Source:
Sets or overrides the value of an option. Useful when it is required to modify a viewer option before loading as slide.
Parameters:
Name | Type | Description |
---|---|---|
option |
string | |
value |
any |