Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IViewerHighlightManager

Class for handling persistent highlights for a viewer

Hierarchy

  • IViewerHighlightManager

Index

Properties

activeSearch

activeSearch: IViewerSearch | undefined

The ongoing search in the viewer for a search term

Methods

addTerms

  • Adds new persistent highlight terms to the set and displays corresponding highlights

    Parameters

    Returns void

changeSetExpanded

  • changeSetExpanded(setArtifactId: number, expanded: boolean, saveState?: boolean): Promise<void>
  • Changes the expanded property of the highlight set

    Parameters

    • setArtifactId: number

      The highlight set's artifact id

    • expanded: boolean
    • Optional saveState: boolean

      Optional parameter that saves the state to the database

    Returns Promise<void>

    Promise that resolves when the set has been updated

changeSetVisibility

  • changeSetVisibility(setArtifactId: number, visible: boolean, saveState?: boolean): Promise<void>
  • Changes the visibility of all the terms in a persistent highlight set

    Parameters

    • setArtifactId: number

      The highlight set's artifact id

    • visible: boolean

      The visible state of all the terms in the set

    • Optional saveState: boolean

      Optional parameter that saves the state to the database

    Returns Promise<void>

    Promise that resolves when the set's visiblity has been updated

changeTermVisibility

  • changeTermVisibility(setArtifactId: number, termArtifactId: number, visible: boolean, saveState?: boolean): Promise<void>
  • Change the visibility of a term in a persistent highlight set

    Parameters

    • setArtifactId: number

      The highlight term's set artifact id

    • termArtifactId: number

      The highlight term's artifact id

    • visible: boolean

      The visible state of the term

    • Optional saveState: boolean

      Optional parameter that saves the state to the database

    Returns Promise<void>

    Promise that resolves when the term's visiblity has been updated

cleanupPersistentHighlights

  • cleanupPersistentHighlights(): void
  • Clears existing persistent highlight drawer

    Returns void

clearRecentSearchSet

  • clearRecentSearchSet(): void
  • Clears out the recent search set

    Returns void

clearRecentSearchTerm

  • clearRecentSearchTerm(termId: number): void
  • Clears out the recent search term that matches the term id

    Parameters

    • termId: number

      id of term to clear

    Returns void

clearSearch

  • clearSearch(): void
  • Clears search term data and highlights

    Returns void

findFirstSearchTerm

  • findFirstSearchTerm(term: string): Promise<boolean>
  • Navigates to the first search term hit

    Parameters

    • term: string

      the term to be searched in the document

    Returns Promise<boolean>

    returns true if the term was found in the document

findNextSearchTerm

  • findNextSearchTerm(term: string): Promise<void>
  • Navigates to the next search term hit

    Parameters

    • term: string

      the term searched in the document

    Returns Promise<void>

findPreviousSearchTerm

  • findPreviousSearchTerm(term: string): Promise<void>
  • Navigates to the previous search term hit

    Parameters

    • term: string

      the term searched in the document

    Returns Promise<void>

navigateToNextHighlight

  • navigateToNextHighlight(setArtifactId?: number, termArtifactId?: number): void
  • Navigates to the next highlight in the document, set, or by term.

    Parameters

    • Optional setArtifactId: number

      (optional) the highlight set to navigate

    • Optional termArtifactId: number

      (optional) the highlight term to navigate

    Returns void

navigateToPrevHighlight

  • navigateToPrevHighlight(setArtifactId?: number, termArtifactId?: number): void
  • Navigates to the previous highlight in the document, set, or by term.

    Parameters

    • Optional setArtifactId: number

      (optional) the highlight set to navigate

    • Optional termArtifactId: number

      (optional) the highlight term to navigate

    Returns void

refresh

  • refresh(): Promise<void>
  • Retrieves latest persistent highlight data from the database and updates the count and visibility

    Returns Promise<void>

    Promise that resolves when data has been retrieved and count and visibility have been updated

selectSet

  • selectSet(setArtifactId: number): void
  • Selects the persistent highlight set with the specified artifact id

    Parameters

    • setArtifactId: number

      The artifact id of the persistent highlight set to select

    Returns void

selectTerm

  • selectTerm(setArtifactId: number, termArtifactId: number): void
  • Selects the specified persistent highlight term in the highlight panel and turns on highlights for that term regardless of term/set visibility state.

    Parameters

    • setArtifactId: number

      the term's set artifact id

    • termArtifactId: number

      the persistent highlight term we are selecting

    Returns void

toggleDrawer

  • toggleDrawer(opened?: boolean): void
  • Opens or closes the persistent highlight drawer

    Parameters

    • Optional opened: boolean

      (optional) sets the visible state of the drawer

    Returns void

unselectAll

  • Re-sets selected state of all sets and terms

    Parameters

    Returns void