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.
Index
Constructors
Accessors
Methods
addNotecheckPinInstanceexplodeexportMarkupfindByIdgetActiveItemgetActiveItemHandlegetExplodeActivegetIsolateActivegetNoteTextElementgetNoteTextListgetPinSphereMeshIdgetPinStemMeshIdloadDataremoveNoteselectPinsetActiveItemsetActiveItemHandlesetIsolateActivesetNoteTextElementupdatePinVisibility
Constructors
-
Operators.NoteTextManager.constructor() - NoteTextManager(viewer:
IWebViewer):NoteTextManagerParameters
viewer:IWebViewerReturns:
NoteTextManager
Accessors
-
Operators.NoteTextManager.viewer() - get viewer():
IWebViewerReturns:
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 managerReturns: void
-
Operators.NoteTextManager.checkPinInstance() - checkPinInstance(nodeId: number): boolean
Checks if a nodeId is part of a note pin
Parameters
nodeId: number
NodeId to be checkedReturns: 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 magnitudeReturns: 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 checkReturns: 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():
NoteTextElementRetrieves the note text element
Returns:
NoteTextElementnote 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 iterableReturns: Promise
-
Operators.NoteTextManager.removeNote() - removeNote(note: NoteText): void
Removes a note from the manager
Parameters
note: NoteText
NoteText to be removed from the managerReturns: void
-
Operators.NoteTextManager.selectPin() - selectPin(selection:
SelectionItem): booleanAttempts to set the active note to the one associated with the pins elected by the provided [[SelectionItem]]
Parameters
selection:
SelectionItemSelectionItem to attempt to find note fromReturns: 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 activeReturns: 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 stringReturns: void
-
Operators.NoteTextManager.setIsolateActive() - setIsolateActive(isolateActive: boolean): void
Sets whether an isolate is currently active or not
Parameters
isolateActive: booleanReturns: void
-
Operators.NoteTextManager.setNoteTextElement() - setNoteTextElement(noteTextElement:
NoteTextElement): voidSets the note text element
Parameters
noteTextElement:NoteTextElementReturns: void
-
Operators.NoteTextManager.updatePinVisibility() - updatePinVisibility(): Promise
Updates note pin visibility based on manager state (namely the current explode state)
Returns: Promise