Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IViewerCardInstance

Viewer card instance information

Hierarchy

Index

Properties

Optional cardActivated

cardActivated: function

Called after the card is activated in a dock.

Type declaration

Optional cardBuildTabOptions

cardBuildTabOptions: function

If provided, this function will be called to build custom viewer tab options for the viewer card.

If no function is provided, a default tab will be created based on the card title.

Type declaration

Optional cardBuildToolbarOptions

cardBuildToolbarOptions: function

If provided, this function will be called to build custom viewer toolbar options for the viewer card.

Type declaration

Optional cardCanDeactivate

cardCanDeactivate: function

Called before the card deactivates to check if it is safe to do so

Type declaration

Optional cardCreateUnsupportedOverlayCard

cardCreateUnsupportedOverlayCard: function

Called when the viewer collection needs a card to show when the viewer does not support the item. A default placeholder is shown if this method is not provided.

Type declaration

Optional cardDeactivated

cardDeactivated: function

Called after the card is deactivated in a dock.

Type declaration

Optional cardError

cardError: function

Called whenever an error occurs while managing the card

Type declaration

Optional cardLoadState

cardLoadState: function

Called to restore the state of the card

Type declaration

Optional cardLoaded

cardLoaded: function

Called after the card content has loaded

Type declaration

Optional cardMaximized

cardMaximized: function

Called when the card is maximized

Type declaration

Optional cardResized

cardResized: function

Called when the card is resized

Type declaration

Optional cardRestored

cardRestored: function

Called when the card is no longer maximized

Type declaration

Optional cardSaveState

cardSaveState: function

Called to save the state of the card

Type declaration

Optional cardUnloaded

cardUnloaded: function

Called before the card content is unloaded

Type declaration

id

id: string

Unique viewer instance ID

type

Viewer type - this should match the viewer type from the configuration object

Optional unsupportedTabTitle

unsupportedTabTitle: string

If provided, this defines the viewer's tab title when the viewer does not support the current queue item.

If not provided, the title will default to "No " in this scenario.

Methods

cardLoadItem

  • Called when the viewer card should load a new queue item

    Parameters

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether or not the load was successful