Interface: IViewerCollection

A collection of IViewerCardInstances

Extends

Properties

activeType

readonlyactiveType: string

Current active viewer type


activeViewer

readonlyactiveViewer: IViewerCardInstance

Current active viewer


bottomToolbar

readonlybottomToolbar: IToolbar

The bottom toolbar for the viewer collection


card

readonlycard: ICard

Gets the card associated with this viewer collection

The card will not be defined until the viewer collection has been bootstrapped and will be set to undefined once it has been torn down.


codingCards?

readonlyoptionalcodingCards: ICard[]

Coding cards correlated to this viewer collection


contentHighlighting

readonlycontentHighlighting: IContentHighlightingManager

Content highlighting manager API for this viewer collection

This can be used to access the highlighting API and card API for specific content highlighting features.


contentType

readonlycontentType: ContentType

The type of content being displayed by the viewer collection

If not content has been loaded yet, this will be undefined


currentDocumentMetric

readonlycurrentDocumentMetric: IPartialMetric

Current document metric

This can be used to enrich the monitoring data that is reported for the content view.


hasActiveViewer

readonlyhasActiveViewer: boolean

true if there is currently an active viewer, false if not


id

readonlyid: string

ID


isBootstrapped

readonlyisBootstrapped: boolean

Whether viewer collection has been bootstrapped


isNavigating

readonlyisNavigating: boolean

Whether the viewer collection is navigating


leftToolbar

readonlyleftToolbar: IToolbar

The left toolbar for the viewer collection


pageLayout

readonlypageLayout: IViewerCollectionPageLayoutApi

API for synchronizing page layout mode across all of the collection's viewers


queuePointer

readonlyqueuePointer: IQueuePointer

Queue pointer used for navigation


queuePointerStack

readonlyqueuePointerStack: IQueuePointer[]

Previously visited queues


rightToolbar

readonlyrightToolbar: IToolbar

The right toolbar for the viewer collection


supportedViewerTypes

readonlysupportedViewerTypes: string[]

ViewerTypes of the viewer collection's viewers


zoom

readonlyzoom: IViewerCollectionZoomApi

API for synchronizing zoom across all of the collection's viewers

Methods

getDockLocation()

getDockLocation(edge): ICardLocation

Retrieves the ICardLocation for the dock on the corresponding edge of the collection

Parameters

edge: RectangleEdge

Edge of the collection to retrieve the dock location for

Returns

ICardLocation

Location data that can be used to place cards within the requested dock


getPublicDocumentData()

getPublicDocumentData(item): Promise<IPublicDocumentData>

Get the public document information for a given queue item

Parameters

item: IQueueItem

IQueueItem to request information for

Returns

Promise<IPublicDocumentData>

The document data


getViewer()

getViewer(type): IViewerCardInstance

Retrieves the IViewerCardInstance with the provided type from the collection

Parameters

type: string

Viewer type to retrieve

Returns

IViewerCardInstance

The retrieved instance


getViewerCard()

getViewerCard(type): IViewerCard

Retreives the IViewerCard with the provided type from the collection

Parameters

type: string

Viewer type to retrieve

Returns

IViewerCard

The retrieved viewer card


off()

off(eventType, handler?, once?): void

Unregisters an event handler

Parameters

eventType: ViewerCollectionEventType

Event to unregister from

handler?: EventHandler

Event handler function. If not passed in, it removes all event handlers.

once?: boolean

Boolean indicating if the event handler was registered as a one-time event handler (Defaults to false)

Returns

void

Inherited from

IEventEmitter.off


on()

on(eventType, handler): void

Registers an event handler

Parameters

eventType: ViewerCollectionEventType

Event to listen for

handler: EventHandler

Event handler function

Returns

void

Inherited from

IEventEmitter.on


once()

once(eventType, handler): void

Registers an event handler that is only run once

Parameters

eventType: ViewerCollectionEventType

Event to listen for

handler: EventHandler

Event handler function

Returns

void

Inherited from

IEventEmitter.once


popQueuePointer()

popQueuePointer(...rest): Promise<boolean>

Sets the current queue pointer to the last-saved queue pointer in the stack

Parameters

• ...rest: any[]

Returns

Promise<boolean>

Whether or not the queue was reverted


reload()

reload(performanceWorkflow?, reloadOptions?, ...rest?): Promise<void>

Reload lifecycle method that is invoked when the viewer instance should refresh all of it's data before reloading the current queue item

Parameters

performanceWorkflow?: IPerformanceWorkflow

Optional workflow object to track metrics

reloadOptions?: IReloadOptions

Optional reload options to occur on a reload action

• ...rest?: any[]

Returns

Promise<void>

Promise that is resolved once the reload is complete


setQueuePointer()

setQueuePointer(newPointer, savePointer?, ...rest?): Promise<void>

Sets IQueuePointer used for navigation The viewer collection will update to reflect the index and viewer type of the new pointer

Parameters

newPointer: IQueuePointer

New queue pointer to use for navigation

savePointer?: boolean

Determines whether the current active pointer is stored in queue navigation history. Defaults true.

• ...rest?: any[]

Returns

Promise<void>

Promise that resolves when the viewer collection has been updated


switchToQueuePointerById()

switchToQueuePointerById(id, ...rest): Promise<boolean>

Sets the current queue pointer to that in the queue pointer stack with the provided id All subsequent pointers in the stack are destroyed

Parameters

id: string

The Guid identifier of the pointer to set

• ...rest: any[]

Returns

Promise<boolean>

Whether or not the queue was reverted


switchToQueuePointerByIndex()

switchToQueuePointerByIndex(index, ...rest): Promise<boolean>

Sets the current queue pointer to that located at the provided index in the queue pointer stack All subsequent pointers in the stack are destroyed

Parameters

index: number

The index of the pointer to navigate to

• ...rest: any[]

Returns

Promise<boolean>

Whether or not the queue was reverted