Interface: IContextMenuReviewData

Information provided to IContextMenuItems about the document being interacted with

Properties

cursor

cursor: Cursor

Location of the right click event on the document


queueItemData?

optionalqueueItemData: IContextMenuQueueItemData

Data about the queue item being interacted with

NOTE: This property will be undefined for context menus outside of the viewer, context menus within the viewer when document content is not being displayed, and context menus within the viewer when the document does not have an associated native.


queuePointer

queuePointer: IQueuePointer

IQueuePointer of the current item being viewed in the IViewerCollection.queuePointer


workspaceId

workspaceId: number

Workspace artifact ID

Methods

exists()

exists(keyName): boolean

Gets whether the key/value pair exists on review data

Parameters

keyName: string

The name of the key

Returns

boolean

Returns a boolean whether the pair exists


get()

get(keyName): any

Gets the value for a key in the review data

Parameters

keyName: string

The name of the key

Returns

any

Returns the object that was saved.


getAnnotationsAtCursor()

getAnnotationsAtCursor(): IAnnotation[]

Retrieves all IAnnotations present at the cursor position where the right-click occurred

IAnnotations are returned in z-order, with the bottommost IAnnotation first.

Returns

IAnnotation[]


getSelectedAnnotations()

getSelectedAnnotations(): IAnnotation[]

Retrieves all IAnnotations currently selected

The topmost IAnnotation at the cursor position will be included with this list, even if it is not selected.

Returns

IAnnotation[]


getSelectedText()

getSelectedText(): string

Retrieves the text that is currently selected

Returns

string

Returns the selected text from the viewer


getSelection()

getSelection(): ViewSelection

Retrieves the Selection object that represents the current selection in the viewer

Returns

ViewSelection

Returns the selection object


getViewerObjectsAtCursor()

getViewerObjectsAtCursor(): IViewerObjects

Retrieves viewer objects at the cursor position, including:

  • Designations
  • Hyperlinks
  • Current viewer content selection

NOTE: This method will return undefined when the context menu is opened outside of a viewer instance or when no objects are present at the cursor position

Returns

IViewerObjects

IViewerObjects object containing the viewer objects at the cursor position


set()

set(keyName, value): void

Sets a key/value pair in review data

Parameters

keyName: string

The name of the key

value: any

The value of the key

Returns

void