NoteTextManager

class Communicator.Markup.Note.NoteTextManager()

Constructors


Constructors

NoteTextManager.constructor(viewer)
Arguments
Return type

NoteTextManager()

Methods

addNote

NoteTextManager.addNote(note)

Adds a note and makes it active

Arguments
  • note (NoteText()) – NoteText to be added to the manager

Return type

void

checkPinInstance

NoteTextManager.checkPinInstance(nodeId)

Checks if a nodeId is part of a note pin

Arguments
  • nodeId (NodeId) – NodeId to be checked

Return type

boolean

explode

NoteTextManager.explode(magnitude)

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

Arguments
  • magnitude (number()) – Explosion magnitude

Return type

Promise <void>

exportMarkup

NoteTextManager.exportMarkup()

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

Return type

[Object]

Returns

Array of JSON objects representing notes

findById

NoteTextManager.findById(id)

Checks if a UUID is associated with any existing notes

Arguments
  • id (Uuid) – UUID to check

Return type

boolean

getActiveItem

NoteTextManager.getActiveItem()

Get the currently active note text

Return type

NoteText | null

Returns

Currently active note text

getActiveItemHandle

NoteTextManager.getActiveItemHandle()

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

Return type

string | null

Returns

Active handle 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

Return type

boolean

Returns

isolate status

getNoteTextElement

NoteTextManager.getNoteTextElement()

Retrieves the note text element

Return type

NoteTextElement()

Returns

note text element

getNoteTextList

NoteTextManager.getNoteTextList()

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

Return type

[NoteText]

Returns

array of all NoteText items

getPinSphereMeshId

NoteTextManager.getPinSphereMeshId()

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

Return type

MeshId | null

Returns

MeshId of the note pin sphere, or null if there is none

getPinStemMeshId

NoteTextManager.getPinStemMeshId()

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

Return type

MeshId | null

Returns

MeshId of the note pin stem, or null if there is none

loadData

NoteTextManager.loadData(notes)

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

Arguments
  • notes (any()) – JSON note data iterable

Return type

Promise <[boolean]>

removeNote

NoteTextManager.removeNote(note)

Removes a note from the manager

Arguments
  • note (NoteText()) – NoteText to be removed from the manager

Return type

void

selectPin

NoteTextManager.selectPin(selection)

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

Arguments
  • selection (SelectionItem()) – SelectionItem to attempt to find note from

Return type

boolean

setActiveItem

NoteTextManager.setActiveItem(activeItem)

Sets a new currently active note text

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

Return type

void

setActiveItemHandle

NoteTextManager.setActiveItemHandle(activeItemHandle)

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

Arguments
  • activeItemHandle (string | null()) – Active handle string

Return type

void

setIsolateActive

NoteTextManager.setIsolateActive(isolateActive)

Sets whether an isolate is currently active or not

Arguments
  • isolateActive (boolean()) –

Return type

void

setNoteTextElement

NoteTextManager.setNoteTextElement(noteTextElement)

Sets the note text element

Arguments
Return type

void

updatePinVisibility

NoteTextManager.updatePinVisibility()

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

Return type

Promise <void>