Options
All
  • Public
  • Public/Protected
  • All
Menu

Viewer Tabs

The viewer collection renders tabs for the different viewer types so users can switch between them. By default, it uses the IViewerCardConfig.title property to render the tab text.

This page contains the following information:

Tab visibility

The following viewer tab visibility modes control the display of tabs:

Note: The viewer tab visibility mode is configured at the instance-level through a Relativity instance setting.

Full mode

Full mode is the default mode. In Full mode, all viewer tabs are visible, regardless of whether they support the current queue item. Viewer types that don't support the current queue item are styled differently to provide a visual indicator to the user.

Limited mode

In Limited mode, only the tabs for viewer types that support the current queue item are visible. This mode implements the behavior of the legacy HTML5 document viewer.

Overriding core viewer types

By default, tabs for custom viewer types are displayed side-by-side the tabs for core viewer types. In some cases, one viewer type replaces another when you override the default behavior of displaying custom viewer type tabs alongside the core viewer type tabs.

For example, a custom viewer type adds support for an audio file format that the Native Viewer doesn't supported. It might be intuitive for the custom viewer type to replace the Native viewer entirely, when a user views a file of that format.

This implementation is called overriding a viewer type. Use this implementation by adding the IViewerCardConfig.overrideViewerType property to your viewer card definition.

In the previous example, the custom audio viewer might have the following viewer card definition properties:

{
    id: "custom.audio",
    title: "Custom Audio",
    viewerType: "custom.audio",
    overrideViewerType: "native",
    // ... other configuration properties
}

The value returned by the supportsItem() method controls the tab display as follows:

  • If the supportsItem() method for the custom viewer type returns true, the Custom Audio tab is displayed instead of the standard Native tab. Additionally, if a user is on the Native Viewer and navigates to this item, the content for the custom viewer type is displayed instead of that for the Native Viewer.

  • If the supportsItem() method for the custom viewer type returns false, the Native tab is displayed or the tab is missing. The tab display depends on the result of the check by the supportsItem() method for the Native Viewer and the current viewer type visibility mode.

Note: Overriding a viewer type bypasses the viewer type visibility mode. Viewer types that utilize this feature don't need to implement an unsupported tab title or overlay card. The viewer collection won't use these components.