NoteTextManager

class Operators.NoteTextManager()

The markup manager exports JSON data for markup in the scene. By default, it will export “views”, “notes”, “measurement”, and “lines”. To add a custom markup class to be exported and imported along with other markup items, you can register a custom markup type manager.

The custom markup manager needs two functions:

  • exportMarkup creates an array of JSON markup data.
  • loadData takes an array of JSON markup data and creates markup items.

Constructors

Operators.NoteTextManager.constructor()
NoteTextManager(viewer: IWebViewer): NoteTextManager

Parameters

viewer: IWebViewer

Returns: NoteTextManager

Accessors

Operators.NoteTextManager.viewer()
get viewer(): IWebViewer

Returns: IWebViewer

Methods

Operators.NoteTextManager.addNote()
addNote(note: NoteText): void

Adds a note and makes it active

Parameters

note: NoteText

NoteText to be added to the manager

Returns: void

Operators.NoteTextManager.checkPinInstance()
checkPinInstance(nodeId: number): boolean

Checks if a nodeId is part of a note pin

Parameters

nodeId: number

NodeId to be checked

Returns: boolean

Operators.NoteTextManager.explode()
explode(magnitude: number): Promise

Sets manager explode state based on explosion magnitude. Active explosion hides note pins

Parameters

magnitude: number

Explosion magnitude

Returns: Promise

Operators.NoteTextManager.exportMarkup()
exportMarkup(): object[]

Exports note texts to an array of JSON Objects that can be restored via [[loadData]]

Returns: object[]

Array of JSON objects representing notes
Operators.NoteTextManager.findById()
findById(id: string): boolean

Checks if a UUID is associated with any existing notes

Parameters

id: string

UUID to check

Returns: boolean

Operators.NoteTextManager.getActiveItem()
getActiveItem(): (None | NoteText)

Get the currently active note text

Returns: (None | NoteText)

Currently active note text
Operators.NoteTextManager.getActiveItemHandle()
getActiveItemHandle(): (None | string)

Get the active handle string, such as the one returned by [[MarkupManager.registerMarkup]]

Returns: (None | string)

Active handle string
Operators.NoteTextManager.getExplodeActive()
getExplodeActive(): boolean

Gets managers explosion state. Active explosion hides note pins

Returns: boolean

Operators.NoteTextManager.getIsolateActive()
getIsolateActive(): boolean

Gets whether an isolate is currently active or not

Returns: boolean

isolate status
Operators.NoteTextManager.getNoteTextElement()
getNoteTextElement(): NoteTextElement

Retrieves the note text element

Returns: NoteTextElement

note text element
Operators.NoteTextManager.getNoteTextList()
getNoteTextList(): NoteText[]

Gets an array of all NoteText items that have been added to the manager

Returns: NoteText[]

array of all NoteText items
Operators.NoteTextManager.getPinSphereMeshId()
getPinSphereMeshId(): (None | MeshId)

Retrieves the mesh id of the spherical head of the note pin, if there is one

Returns: (None | MeshId)

MeshId of the note pin sphere, or null if there is none
Operators.NoteTextManager.getPinStemMeshId()
getPinStemMeshId(): (None | MeshId)

Retrieves the mesh id of the stem of the note pin, if there is one

Returns: (None | MeshId)

MeshId of the note pin stem, or null if there is none
Operators.NoteTextManager.loadData()
loadData(notes: any): Promise

Loads notes from an iterable of JSON data like that returned by [[exportMarkup]]

Parameters

notes: any

JSON note data iterable

Returns: Promise

Operators.NoteTextManager.removeNote()
removeNote(note: NoteText): void

Removes a note from the manager

Parameters

note: NoteText

NoteText to be removed from the manager

Returns: void

Operators.NoteTextManager.selectPin()
selectPin(selection: SelectionItem): boolean

Attempts to set the active note to the one associated with the pins elected by the provided [[SelectionItem]]

Parameters

selection: SelectionItem

SelectionItem to attempt to find note from

Returns: boolean

Operators.NoteTextManager.setActiveItem()
setActiveItem(activeItem: (None | NoteText)): void

Sets a new currently active note text

Parameters

activeItem: (None | NoteText)

note text to be marked as currently active

Returns: void

Operators.NoteTextManager.setActiveItemHandle()
setActiveItemHandle(activeItemHandle: (None | string)): void

Set the active handle string, should be provided by [[MarkupManager.registerMarkup]]

Parameters

activeItemHandle: (None | string)

Active handle string

Returns: void

Operators.NoteTextManager.setIsolateActive()
setIsolateActive(isolateActive: boolean): void

Sets whether an isolate is currently active or not

Parameters

isolateActive: boolean

Returns: void

Operators.NoteTextManager.setNoteTextElement()
setNoteTextElement(noteTextElement: NoteTextElement): void

Sets the note text element

Parameters

noteTextElement: NoteTextElement

Returns: void

Operators.NoteTextManager.updatePinVisibility()
updatePinVisibility(): Promise

Updates note pin visibility based on manager state (namely the current explode state)

Returns: Promise