Components

Components

Source:
PMA.UI.Components contains UI and utility components that interact with a viewport and PMA.core

Classes

Annotations
Context
Forms
Gallery
MetadataSearch
MetadataTree
SlideLoader
SyncView
Tree

Namespaces

Events

Members

(static, readonly) ApiMethods :string

Source:
Properties:
Name Type Description
Authenticate string
GetFiles string
GetDirectories string
GetImageInfo string
GetImagesInfo string
DeAuthenticate string
GetForms string
GetFormDefinitions string
GetFormSubmissions string
GetForm string
SaveFormDefinition string
DeleteFormDefinition string
SaveFormData string
GetFormData string
GetAnnotations string
AddAnnotation string
UpdateAnnotation string
DeleteAnnotation string
GetVersionInfo string
QueryFilename string
SaveAnnotations string
DistinctValues string
Metadata string
GetEvents string
PMA.core API methods
Type:
  • string

(static, readonly) GalleryRenderOptions :string

Source:
Properties:
Name Type Description
All string Render both thumbnail and barcode
Thumbnail string Render thumbnail only
Barcode string Render barcode only
Available components to render
Type:
  • string

(static, readonly) GetSlidesScope :string

Source:
Properties:
Name Type Description
Normal string
OneLevel string
Recursive string
PMA.core scopes for the GetSlides API method
Type:
  • string

Methods

(static) callApiMethod(options)

Source:
Invokes a PMA.core API method. This method will properly encode all provided parameters.
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
serverUrl string The URL of the PMA.core instance
method string The API method to call
httpMethod string The HTTP verb
data object The parameters to pass to the API method
apiPath string <optional>
"api" The API path to append to the server URL
contentType string <optional>
""
success function <optional>
Function to call upon successful method invocation
failure function <optional>
Function to call upon unsuccessful method invocation

(static) getBarcodeUrl(serverUrl, sessionId, pathOrUid, rotationopt)

Source:
Returns a URL that points to the barcode of a slide image. This method doesn't guarantee that a barcode image actually exists.
Parameters:
Name Type Attributes Default Description
serverUrl string
sessionId string
pathOrUid string
rotation Number <optional>
0

(static) getSnapshotUrl(serverUrl, sessionId, pathOrUid, snapshotParameters, thumbWidth, thumbHeight, formatopt)

Source:
Returns a URL that points to the snapshot of a slide image
Parameters:
Name Type Attributes Default Description
serverUrl string
sessionId string
pathOrUid string
snapshotParameters PMA.UI.Components~snapshotParameters The parameters required for the snapshot
thumbWidth Number The final snapshot width (this may be smaller due to aspect ratio)
thumbHeight Number The final snapshot height (this may be smaller due to aspect ratio)
format string <optional>
jpg The snapshot image format

(static) getThumbnailUrl(serverUrl, sessionId, pathOrUid, orientationopt, widthopt, heightopt)

Source:
Returns a URL that points to the thumbnail of a slide image
Parameters:
Name Type Attributes Default Description
serverUrl string
sessionId string
pathOrUid string
orientation Number <optional>
0
width Number <optional>
0
height Number <optional>
0

(static) login(serverUrl, username, password, caller, success, failure)

Source:
Authenticates against a PMA.core server
Parameters:
Name Type Description
serverUrl string
username string
password string
caller string
success function
failure function

(static) parseDragData(dataTransfer) → {PMA.UI.Components~dragDropObject}

Source:
Tries to parse the data passed from a drag and drop operation
Parameters:
Name Type Description
dataTransfer Object The browser dataTransfer object
Returns:
- The parsed drag and drop object or null
Type
PMA.UI.Components~dragDropObject

Type Definitions

authenticationResponse

Source:
Properties:
Name Type Description
SessionId string The session ID
Username string The username
Email string The user's email
FirstName string The user's first name
LastName string The user's last name
PMA.core authentication response
Type:
  • Object

DragDropMimeType

Source:
The mime type used for drag n drop data transfer
Type:
  • string

dragDropObject

Source:
Properties:
Name Type Description
serverUrl string The serverUrl
path string The path to a slide or directory
isFolder boolean Whether this is a path or a directory
An object expected for drag and drop features
Type:
  • Object

snapshotParameters

Source:
Properties:
Name Type Attributes Default Description
x number The x coordinate of the top left point
y number The y coordinate of the top left point
width number The width of the viewport
height number The height of the viewport
rotation number The rotation of the viewport (in degrees)
flipHorizontally boolean Wheter the snapshot is flipped horizontally
flipVertically boolean Wheter the snapshot is flipped vertically
channels Array <optional>
The selected channels
layer number <optional>
0 The selected layer
timeframe number <optional>
0 The selected timeframe
snapshot parameters
Type:
  • Object