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
Methods
addNote()
checkPinInstance()
explode()
exportMarkup()
findById()
getActiveItem()
getActiveItemHandle()
getExplodeActive()
getIsolateActive()
getNoteTextElement()
getNoteTextList()
getPinSphereMeshId()
getPinStemMeshId()
loadData()
removeNote()
selectPin()
setActiveItem()
setActiveItemHandle()
setIsolateActive()
setNoteTextElement()
updatePinVisibility()
Constructors
-
NoteTextManager.
constructor
(viewer) Arguments: - viewer (
IWebViewer()
) – None
Return type: NoteTextManager
- viewer (
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 - note (
checkPinInstance
-
NoteTextManager.
checkPinInstance
(nodeId) Arguments: - nodeId (
number()
) – NodeId to be checked
Checks if a nodeId is part of a note pin
Return type: boolean - nodeId (
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> - magnitude (
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 - id (
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]> - notes (
removeNote
-
NoteTextManager.
removeNote
(note) Arguments: - note (
NoteText()
) – NoteText to be removed from the manager
Removes a note from the manager
Return type: void - note (
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 - selection (
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 - activeItem (
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 - activeItemHandle (
setIsolateActive
-
NoteTextManager.
setIsolateActive
(isolateActive) Arguments: - isolateActive (
boolean()
) – None
Sets whether an isolate is currently active or not
Return type: void - isolateActive (
setNoteTextElement
-
NoteTextManager.
setNoteTextElement
(noteTextElement) Arguments: - noteTextElement (
NoteTextElement()
) – None
Sets the note text element
Return type: void - noteTextElement (