Last date modified: 2025-Jul-02

Interface: IViewerHighlightManager

Class for handling persistent highlights for a viewer

Properties

activeSearch

activeSearch: IViewerSearch

The ongoing search in the viewer for a search term

Methods

addTerms()

addTerms(set, newTerms): void

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

Parameters

set: IPersistentHighlightSet

The persistent highlight set to add to

newTerms: IPersistentHighlightTerm[]

The persistent highlight terms to add

Returns

void


changeSetExpanded()

changeSetExpanded(setArtifactId, expanded, saveState?): Promise<void>

Changes the expanded property of the highlight set

Parameters

setArtifactId: number

The highlight set's artifact id

expanded: boolean

The state of the set being expanded or collapsed

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, visible, saveState?): 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

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, termArtifactId, visible, saveState?): 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

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): 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): 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): Promise<void>

Navigates to the next search term hit

Parameters

term: string

the term searched in the document

Returns

Promise<void>


findPreviousSearchTerm()

findPreviousSearchTerm(term): Promise<void>

Navigates to the previous search term hit

Parameters

term: string

the term searched in the document

Returns

Promise<void>


navigateToNextHighlight(setArtifactId?, termArtifactId?): void

Navigates to the next highlight in the document, set, or by term.

Parameters

setArtifactId?: number

(optional) the highlight set to navigate

termArtifactId?: number

(optional) the highlight term to navigate

Returns

void


navigateToPrevHighlight(setArtifactId?, termArtifactId?): void

Navigates to the previous highlight in the document, set, or by term.

Parameters

setArtifactId?: number

(optional) the highlight set to navigate

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): 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, termArtifactId): 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?): void

Opens or closes the persistent highlight drawer

Parameters

opened?: boolean

(optional) sets the visible state of the drawer

Returns

void


unselectAll()

unselectAll(persistentHighlightData): void

Re-sets selected state of all sets and terms

Parameters

persistentHighlightData: IPersistentHighlightSet[]

the PHS data to unselect

Returns

void

Return to top of the page
Feedback