NoteTextManager

class Operators.Markup.Note.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


Constructors

NoteTextManager.constructor(viewer)
Arguments:
  • viewer (IWebViewer()) – None
Return type:

NoteTextManager

Methods

addNote

NoteTextManager.addNote(note)
Arguments:
  • note (NoteText()) – NoteText to be added to the manager

Adds a note and makes it active

Return type:void

checkPinInstance

NoteTextManager.checkPinInstance(nodeId)
Arguments:
  • nodeId (number()) – NodeId to be checked

Checks if a nodeId is part of a note pin

Return type:boolean

explode

NoteTextManager.explode(magnitude)
Arguments:
  • magnitude (number()) – Explosion magnitude

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

Return type:Promise <void>

exportMarkup

NoteTextManager.exportMarkup()

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

Returns:Array of JSON objects representing notes
Return type:[object]

findById

NoteTextManager.findById(id)
Arguments:
  • id (string()) – UUID to check

Checks if a UUID is associated with any existing notes

Return type:boolean

getActiveItem

NoteTextManager.getActiveItem()

Get the currently active note text

Returns:Currently active note text
Return type:null | NoteText

getActiveItemHandle

NoteTextManager.getActiveItemHandle()

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

Returns:Active handle string
Return type:null | string

getExplodeActive

NoteTextManager.getExplodeActive()

Gets managers explosion state. Active explosion hides note pins

Return type:boolean

getIsolateActive

NoteTextManager.getIsolateActive()

Gets whether an isolate is currently active or not

Returns:isolate status
Return type:boolean

getNoteTextElement

NoteTextManager.getNoteTextElement()

Retrieves the note text element

Returns:note text element
Return type:NoteTextElement

getNoteTextList

NoteTextManager.getNoteTextList()

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

Returns:array of all NoteText items
Return type:[NoteText]

getPinSphereMeshId

NoteTextManager.getPinSphereMeshId()

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

Returns:MeshId of the note pin sphere, or null if there is none
Return type:null | MeshId

getPinStemMeshId

NoteTextManager.getPinStemMeshId()

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

Returns:MeshId of the note pin stem, or null if there is none
Return type:null | MeshId

loadData

NoteTextManager.loadData(notes)
Arguments:
  • notes (any()) – JSON note data iterable

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

Return type:Promise <[boolean]>

removeNote

NoteTextManager.removeNote(note)
Arguments:
  • note (NoteText()) – NoteText to be removed from the manager

Removes a note from the manager

Return type:void

selectPin

NoteTextManager.selectPin(selection)
Arguments:
  • selection (SelectionItem()) – SelectionItem to attempt to find note from

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

Return type:boolean

setActiveItem

NoteTextManager.setActiveItem(activeItem)
Arguments:
  • activeItem (null | NoteText()) – note text to be marked as currently active

Sets a new currently active note text

Return type:void

setActiveItemHandle

NoteTextManager.setActiveItemHandle(activeItemHandle)
Arguments:
  • activeItemHandle (null | string()) – Active handle string

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

Return type:void

setIsolateActive

NoteTextManager.setIsolateActive(isolateActive)
Arguments:
  • isolateActive (boolean()) – None

Sets whether an isolate is currently active or not

Return type:void

setNoteTextElement

NoteTextManager.setNoteTextElement(noteTextElement)
Arguments:

Sets the note text element

Return type:void

updatePinVisibility

NoteTextManager.updatePinVisibility()

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

Return type:Promise <void>