Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IImageViewer

Image Viewer IViewerInstance

Hierarchy

Index

Properties

Optional activeMarkupSetArtifactId

activeMarkupSetArtifactId: number

Artifact ID of the active Relativity IMarkupSet

Optional annotationToolSubType

annotationToolSubType: AnnotationSubType

When the drawing tool type is DrawingToolType.Annotation, this drives the sub-type of Relativity markup that is created on click.

When the annotation type is AnnotationType.Highlight, this must be a HighlightSubType and when the annotation type is AnnotationType.Redaction, this must be a RedactionSubType.

Optional annotationToolType

annotationToolType: AnnotationType

When the drawing tool type is DrawingToolType.Annotation, this drives the type of Relativity markup that is created on click.

This is undefined when the drawing tool type is DrawingToolType.Selection

currentPageIndex

currentPageIndex: number

Gets the current page index.

returns

drawingToolType

drawingToolType: DrawingToolType

Tool type that determines mouse click behavior on the document

highlightsEnabled

highlightsEnabled: boolean

Whether or not highlight controls are enabled

This is based on user's highlight permissions and whether the user has access to at least one IMarkupSet

id

id: string

ID of the instance

isBootstrapped

isBootstrapped: boolean

Whether or not the viewer instance has been bootstrapped

loadError

loadError: Error

Populated with error when loadSuccessful is false. Otherwise, undefined.

readonly
returns

loadSuccessful

loadSuccessful: boolean

Returns true, if document was loaded into view without error.

readonly
returns

name

name: string

Name of the viewer instance

oiPagesLoadedCount

oiPagesLoadedCount: number

Gets the current number of loaded pages for the current document.

returns

redactionText

redactionText: string

The text that will be used to populate text redactions

This is defaulted to the user's default value when the IViewerInstance is bootstrapped.

redactionTextSize

redactionTextSize: RedactionTextSize

The size of the text on text redactions.

This is defaulted to the user's default value when the IViewerInstance is bootstrapped.

redactionsEnabled

redactionsEnabled: boolean

Whether or not redaction controls are enabled

This is based on user's redaction permissions and whether the user has access to at least one IMarkupSet

thumbnailsVisible

thumbnailsVisible: boolean

Returns true if thumbnails are visible

returns

totalImageCount

totalImageCount: number

Gets the number of images for the current document

type

Viewer type

Methods

activate

  • activate(): Promise<void>
  • Activate lifecycle method that is invoked when the instance is becoming the IViewerCollection's active viewer

    Returns Promise<void>

    Promise that is resolved once activation is complete.

bootstrap

  • Bootstrap lifecycle method for one-time setup of the viewer instance.

    This method is called after the instance's DOM element has been setup, but before any documents are loaded.

    Parameters

    • elementId: string

      ID of the viewer instance's DOM element

    • collection: IViewerCollection

      The viewer collection the instance belongs to

    Returns Promise<void>

    Promise that is resolved once bootstrapping is complete.

canDeactivate

  • canDeactivate(): boolean
  • CanDeactivate lifecycle method that is invoked when the IViewerCollection needs to determine if it is safe to unload a document

    Returns boolean

    Whether or not it is safe to load a new item, deactivate the viewer, or teardown the viewer.

createAnnotation

deactivate

  • deactivate(): Promise<void>
  • Deactivate lifecycle method that is invoked when the instance is no longer the IViewerCollection's active viewer

    Returns Promise<void>

    Promise that is resolved once deactivation is complete.

deleteAnnotation

  • deleteAnnotation(annotation: IAnnotation): Promise<void>
  • Deletes an IAnnotation on the current document

    If deletion fails this method will throw and the user will be notified via a banner and console errors.

    Parameters

    Returns Promise<void>

deleteAnnotationType

  • Deletes IAnnotations on the current document if they are on the specified page and are the same type/subtype

    If deletion fails this method will throw and the user will be notified via a banner and console errors.

    Parameters

    • pageIndexes: number[]

      Pages the annotations will be created on (Pages are 0-indexed)

    • type: AnnotationType

      Annotation type

    • subType: AnnotationSubType

      Annotation sub-type

    Returns Promise<void>

deleteAnnotations

  • deleteAnnotations(annotations: IAnnotation[]): Promise<void>
  • Deletes IAnnotations on the current document

    If deletion fails this method will throw and the user will be notified via a banner and console errors.

    Parameters

    Returns Promise<void>

deselectAllAnnotations

  • deselectAllAnnotations(): void
  • Deselects all IAnnotations in the UI

    Rendering is asynchronous while the call deselect is synchronous

    Returns void

getPageRotation

  • getPageRotation(index: number): number
  • Gets the page rotations in degrees for a particular page

    Parameters

    • index: number

    Returns number

    Page rotation value

getSelectedAnnotations

hideRedactions

  • hideRedactions(): Promise<void>
  • Hides the displayed IAnnotations

    Returns Promise<void>

load

  • load(item: IQueueItem): Promise<void>
  • Load lifecycle method that is invoked when the viewer instance should load a document from the queue

    Parameters

    • item: IQueueItem

      Item to be loaded and displayed to the user

    Returns Promise<void>

    Promise that is resolved once the item has been loaded.

massCreateAnnotation

massDeleteAnnotationType

  • massDeleteAnnotationType(pageIndexes: number[], type: AnnotationType[], includeFullPageRedactions?: boolean): Promise<void>
  • Deletes IAnnotations on the current document if they are on the specified page and is included as a type

    Parameters

    • pageIndexes: number[]

      Pages the annotations will be created on (Pages are 0-indexed)

    • type: AnnotationType[]

      Annotation type(s)

    • Optional includeFullPageRedactions: boolean

      Flag for distinguising between full-page and non-full-page redactions

    Returns Promise<void>

moveToNextPage

  • moveToNextPage(): void
  • Moves to the next page on the OI Doc

    description

    Rendering is asynchronous while the call to move to page is synchronous

    Returns void

moveToPage

  • moveToPage(pageIndex: number): void
  • Moves to pageIndex if exists in the OI document.

    description

    Rendering is asynchronous while the call to move to page is synchronous

    Parameters

    • pageIndex: number

      Index of target page. This index is 0-based.

    Returns void

moveToPreviousPage

  • moveToPreviousPage(): void
  • Moves to the previous page on the OI Doc

    description

    Rendering is asynchronous while the call to move to page is synchronous

    Returns void

openAboutHydroModal

  • openAboutHydroModal(): Promise<DialogCancellableOpenResult>
  • Opens the About Hydro Modal

    Returns Promise<DialogCancellableOpenResult>

openCreateMassRedactionModal

  • openCreateMassRedactionModal(): Promise<DialogCancellableOpenResult>
  • Opens the Edit Text Redaction Modal

    Returns Promise<DialogCancellableOpenResult>

openEditTextRedactionModal

  • openEditTextRedactionModal(inputText: string, annotationsToEdit: IAnnotation[]): Promise<DialogCancellableOpenResult>
  • Opens the Edit Text Redaction Modal

    memberof

    IImageViewer

    Parameters

    • inputText: string

      Current text of the annotation

    • annotationsToEdit: IAnnotation[]

      Array of annotations to edit

    Returns Promise<DialogCancellableOpenResult>

openMassDeleteMarkupModal

  • openMassDeleteMarkupModal(): Promise<DialogCancellableOpenResult>
  • Opens the Mass Delete Markup Modal

    Returns Promise<DialogCancellableOpenResult>

openSaveAsPdfModal

  • openSaveAsPdfModal(): Promise<DialogCancellableOpenResult>
  • Opens the Save as PDF Modal

    Returns Promise<DialogCancellableOpenResult>

reload

  • reload(): 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

    Returns Promise<void>

    Promise that is resolved once the reload is complete.

reloadAnnotations

  • reloadAnnotations(): Promise<void>
  • Reloads all IAnnotations on the page after getting the annotations from the server.

    Returns Promise<void>

rotateAllPagesClockwise

  • rotateAllPagesClockwise(): Promise<boolean>
  • Rotates the all pages clockwise 90 degrees based on the current page (The topmost image) orientation and updates the database

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

rotateCurrentPageClockwise

  • rotateCurrentPageClockwise(): Promise<boolean>
  • Rotates the current page (The topmost image) clockwise 90 degrees and updates the database

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

selectAnnotation

  • selectAnnotation(markupSetArtifactId: number, markupId: number): Promise<void>
  • Selects correlating IAnnotation from the IMarkupSet in the UI

    Parameters

    • markupSetArtifactId: number

      Artifact ID of markup set the redaction is in

    • markupId: number

      Artifact ID of annotation to be selected

    Returns Promise<void>

    Promise that is resolved after the annotation has been selected and scrolled into view.

setActiveMarkupSet

  • setActiveMarkupSet(markupSetArtifactId: number): Promise<void>
  • Updates the active IMarkupSet

    Parameters

    • markupSetArtifactId: number

      Artifact ID of the Relativity IMarkupSet

    Returns Promise<void>

    Promise that is resolved when the update is complete and all IAnnotations have been loaded

setDrawingTool

setPageLayoutMode

  • setPageLayoutMode(scrollMode: ViewerScrollMode): void
  • Sets the page layout mode for the current OI View using the passed in value

    Parameters

    • scrollMode: ViewerScrollMode

      scroll mode setting

    Returns void

setPageRotation

  • setPageRotation(rotation: number, index: number): Promise<boolean>
  • Sets the page rotation for a particular page and updates the database

    Only accepts intervals of 90 degrees

    Parameters

    • rotation: number
    • index: number

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

setPageRotationAllImages

  • setPageRotationAllImages(rotation: number): Promise<boolean>
  • Sets all page rotations for a document and updates the database

    Only accepts intervals of 90 degrees

    Parameters

    • rotation: number

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

showRedactions

  • showRedactions(): Promise<void>
  • Shows the displayed IAnnotations

    Returns Promise<void>

teardown

  • teardown(): Promise<void>
  • Teardown lifecycle method for one-time teardown of the viewer instance.

    This method is called when the IViewerCollection is being torn down.

    Returns Promise<void>

    Promise that is resolved once teardown is complete.

toggleRedactionOpacity

  • toggleRedactionOpacity(): Promise<void>
  • Toggles the opacity of all IAnnotations being shown.

    When first invoked, the opacity is changed to be 30%. When invoked for the second time, the opacity is changed to be 0%. When invoked a third time, the opacity is restored to 100%.

    Returns Promise<void>

toggleThumbnails

  • toggleThumbnails(showThumbnails: boolean): void
  • Toggles Outside In Thumbnails functionality based on thumbnailsVisible property

    Parameters

    • showThumbnails: boolean

    Returns void

totalPageCount

  • totalPageCount(): number
  • returns the total number of pages on the current document

    description

    this will return the total page count for the active viewer's document

    Returns number

transparentRedactions

  • transparentRedactions(): Promise<void>
  • Changes the IAnnotation opacity to be 30%.

    Returns Promise<void>

updateAnnotation

  • updateAnnotation(annotation: IAnnotation): Promise<void>
  • Updates an IAnnotation on the current document

    Parameters

    Returns Promise<void>

updateAnnotations

  • updateAnnotations(annotations: IAnnotation[]): Promise<void>
  • Updates IAnnotations on the current document

    Parameters

    Returns Promise<void>