new WebDocumentThumbnailer(settingsopt, openCallbackopt) → {WebDocumentThumbnailer}
Control that shows thumbnails of document pages and annotations.
Parameters:
Name | Type | Description |
---|---|---|
[settings] |
WebThumbnailerConfig | Object of key value pairs representing initial settings |
[openCallback] |
OpenUrlCallback | callback that is called when document load complete(if |
Returns:
A new control with the given settings.
- Type
- WebDocumentThumbnailer
Extends
Members
Methods
activate()
Takes ownership over referenced viewer, i.e. if shared viewer is currently displaying other document, it's switched to display document from calling thumbnailer.
deselectThumb(index, callbackopt)
Resets the thumbnail highlight at the given index, and scrolls to the next selected thumbnail in the linked viewer, if possible.
This function doesn't deselect the given index in the single select mode, and in multi select mode, if one page is selected.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | string | Index of the page to deselect. Can be passed as string representation of a number |
[callback] |
NotificationCallback | function that is called when thumbnail has been deselected. |
getSelectedPageIndex() → {number}
Gets the selected thumbnail index.
Gets the selected thumbnail index when Web Document Thumbnailer (WDT) setup to use singleselect. When WDT setup to use multiselect, then this method returns the first element of the selected page indices, with respect of selecteditemsorder
parameter value.
Returns:
- Type
- number
getSelectedPagesIndices() → {Array.<number>}
Gets the selected thumbnails indices.
Gets the selected thumbnails indices with respect of selecteditemsorder
parameter value.
Returns:
- Type
- Array.<number>
isActive() → {boolean}
Checks whether current thumbnailer is controlling referenced viewer.
If viewer is linked only to the current thumbnailer, this method always return true
.
If thumbnailer is not linked to any viewer, this method always return false
.
Returns:
true
if current thumbnailer instance is controlling referenced viewer; false
otherwise.
- Type
- boolean
scrollToThumb(index, callbackopt)
Scrolls the viewer to the given page number and executes the callback when finished
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Index of the page to scroll to. |
[callback] |
NotificationCallback | Function to execute after this operation is done. |
selectThumb(index, appendopt, callbackopt)
Highlights the thumbnail at the given index, and scrolls to it in the linked viewer, if possible.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | string | Index of the page to select. Can be passed as string representation of a number |
[append] |
boolean | Append index to the already selected thumbs or not. Its value ignores in single select mode. |
[callback] |
NotificationCallback | function that is called when thumbnail has been selected. |
Events
activedocumentchanged :NotificationCallback
Triggers when viewer has been activated by another thumbnailer or reactivated by the same thumbnailer with changed document data.
- Inherited From:
beforehandlerrequest :BeforeHandlerRequestCallback
Triggers before a request is sent to the server.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
documentinfochanged
Triggers when the document info has changed, usually after a new document is opened.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
documentloaded
Triggers when the document is done loading.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
documentsaved
Triggers after a response from the server while saving the document.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
documentunloaded :NotificationCallback
Triggers when the document has been unloaded from the control.
- Inherited From:
error :ErrorCallback
Triggers when the control has encountered and error. Populated keys: e.name, e.message
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
fileaddedtoupload
Triggers when the file added to upload files through UI controls.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
object | The event object. Properties
|
- Inherited From:
fileuploaderror
Triggers when file upload has failed or was canceled.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
fileuploadfinished
Triggers when file upload has finished successfully.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
fileuploading
Triggers during file upload process. Can be used to track upload progress.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
fileuploadstarted
Triggers when file upload is started
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
initialized :NotificationCallback
Triggers when the control has completed asynchronous initialization.
Asynchronous initialization happens when some dependent scripts are not included to web page and control trying to load them on background.
In case of synchronous initialization, this event won't be fired. isReady
method could be used after construction to check whether control is initialized.
- Inherited From:
pagenumberchanged
Triggers when the page number has changed. Populated keys: e.number
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | The event object. |
- Inherited From:
pagerecycled
Triggers when the control has recycled a pageDiv object.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
pageresize
Triggers when the control has resized a pageDiv object.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
pageshown
Triggers when the control has shown a page in the viewable area.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
pagesizechanged
Triggers when the page size returned from the server is different than expected. The expected page size is the size returned from server along with other document info.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
pagetextloaded :LoadPageTextCallback
Triggers when page text loaded.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
scriptsloaded :NotificationCallback
Triggers when dependencies have finished loading.
- Inherited From:
scroll
Triggers for every pixel movement registered by the scrollable area.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
statusmessage
Triggers when the control has updated the status bar.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
textselected :NotificationCallback
Triggers when UI text selection complete.
- Inherited From:
thumbdeselected
Triggers when thumbnail is deselected.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
thumbdragcomplete :ThumbDragCompleteEventArgs
Triggers after thumbnail drag & drop operation is complete.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | The event object. |
args |
ThumbDragCompleteEventArgs | The event data. |
thumbdragend :ThumbDragEndCallback
Triggers before thumbnail drag & drop operation is complete. This event could be triggered for either case when thumb was dropped within same document where it belongs or when thumb was dropped to the external document.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | The event object. |
args |
ThumbDragEndEventArgs | The event data. Note that args.cancel flag allows to prevent default drop handler behavior.
If set by the application, page want be moved to the new position by the |
thumbdragstart
Triggers when thumbnail drag & drop operation is started.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
thumbselected
Triggers when thumbnail is selected.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
uploadfinished
Triggers when the files upload is finished
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
uploadstarted
Triggers when the files upload is started.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Object | The event object. Properties
|
- Inherited From:
zoomchanged
Triggers when the zoom level of the control has changed.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | The event object. |
zoom |
number | Current document zoom value. |
- Inherited From:
zoomstarted :NotificationCallback
Triggers when a zoom operation has been started.
- Inherited From: