
###############
NoteTextManager
###############

.. js: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
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Operators.NoteTextManager.constructor`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Operators.NoteTextManager.viewer`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Operators.NoteTextManager.addNote`
   * :js:meth:`~Operators.NoteTextManager.checkPinInstance`
   * :js:meth:`~Operators.NoteTextManager.explode`
   * :js:meth:`~Operators.NoteTextManager.exportMarkup`
   * :js:meth:`~Operators.NoteTextManager.findById`
   * :js:meth:`~Operators.NoteTextManager.getActiveItem`
   * :js:meth:`~Operators.NoteTextManager.getActiveItemHandle`
   * :js:meth:`~Operators.NoteTextManager.getExplodeActive`
   * :js:meth:`~Operators.NoteTextManager.getIsolateActive`
   * :js:meth:`~Operators.NoteTextManager.getNoteTextElement`
   * :js:meth:`~Operators.NoteTextManager.getNoteTextList`
   * :js:meth:`~Operators.NoteTextManager.getPinSphereMeshId`
   * :js:meth:`~Operators.NoteTextManager.getPinStemMeshId`
   * :js:meth:`~Operators.NoteTextManager.loadData`
   * :js:meth:`~Operators.NoteTextManager.removeNote`
   * :js:meth:`~Operators.NoteTextManager.selectPin`
   * :js:meth:`~Operators.NoteTextManager.setActiveItem`
   * :js:meth:`~Operators.NoteTextManager.setActiveItemHandle`
   * :js:meth:`~Operators.NoteTextManager.setIsolateActive`
   * :js:meth:`~Operators.NoteTextManager.setNoteTextElement`
   * :js:meth:`~Operators.NoteTextManager.updatePinVisibility`
   
   




Constructors
============

.. js:method:: Operators.NoteTextManager.constructor

   .. rst-class:: sig-pretty-signature
   
      | NoteTextManager(**viewer**\ : :js:class:`~IWebViewer`\ ): :js:class:`NoteTextManager <Operators.NoteTextManager>`
   
   **Parameters**
   
      **viewer**\ : :js:class:`~IWebViewer`
   
   
   **Returns**\ : :js:class:`NoteTextManager <Operators.NoteTextManager>`
   





Accessors
=========

.. js:method:: Operators.NoteTextManager.viewer

   .. rst-class:: sig-pretty-signature
   
      | *get* viewer(): :js:class:`~IWebViewer`
   
   **Returns**\ : :js:class:`~IWebViewer`
   





Methods
=======

.. js:method:: Operators.NoteTextManager.addNote

   .. rst-class:: sig-pretty-signature
   
      | addNote(**note**\ : *NoteText*\ ): *void*
   
   Adds a note and makes it active
   
   **Parameters**
   
      **note**\ : *NoteText*
   
         NoteText to be added to the manager
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.NoteTextManager.checkPinInstance

   .. rst-class:: sig-pretty-signature
   
      | checkPinInstance(**nodeId**\ : *number*\ ): *boolean*
   
   Checks if a nodeId is part of a note pin
   
   **Parameters**
   
      **nodeId**\ : *number*
   
         NodeId to be checked
   
   
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.NoteTextManager.explode

   .. rst-class:: sig-pretty-signature
   
      | explode(**magnitude**\ : *number*\ ): *Promise*
   
   Sets manager explode state based on explosion magnitude. Active explosion hides note pins
   
   **Parameters**
   
      **magnitude**\ : *number*
   
         Explosion magnitude
   
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Operators.NoteTextManager.exportMarkup

   .. rst-class:: sig-pretty-signature
   
      | 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
   
   



.. js:method:: Operators.NoteTextManager.findById

   .. rst-class:: sig-pretty-signature
   
      | findById(**id**\ : *string*\ ): *boolean*
   
   Checks if a UUID is associated with any existing notes
   
   **Parameters**
   
      **id**\ : *string*
   
         UUID to check
   
   
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.NoteTextManager.getActiveItem

   .. rst-class:: sig-pretty-signature
   
      | getActiveItem(): (*None* \| *NoteText*\ )
   
   Get the currently active note text
   
   **Returns**\ : (*None* \| *NoteText*\ )
   
      Currently active note text
   
   



.. js:method:: Operators.NoteTextManager.getActiveItemHandle

   .. rst-class:: sig-pretty-signature
   
      | getActiveItemHandle(): (*None* \| *string*\ )
   
   Get the active handle string, such as the one returned by [[MarkupManager.registerMarkup]]
   
   **Returns**\ : (*None* \| *string*\ )
   
      Active handle string
   
   



.. js:method:: Operators.NoteTextManager.getExplodeActive

   .. rst-class:: sig-pretty-signature
   
      | getExplodeActive(): *boolean*
   
   Gets managers explosion state. Active explosion hides note pins
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.NoteTextManager.getIsolateActive

   .. rst-class:: sig-pretty-signature
   
      | getIsolateActive(): *boolean*
   
   Gets whether an isolate is currently active or not
   
   **Returns**\ : *boolean*
   
      isolate status
   
   



.. js:method:: Operators.NoteTextManager.getNoteTextElement

   .. rst-class:: sig-pretty-signature
   
      | getNoteTextElement(): :js:class:`NoteTextElement <Operators.Markup.Note.NoteTextElement>`
   
   Retrieves the note text element
   
   **Returns**\ : :js:class:`NoteTextElement <Operators.Markup.Note.NoteTextElement>`
   
      note text element
   
   



.. js:method:: Operators.NoteTextManager.getNoteTextList

   .. rst-class:: sig-pretty-signature
   
      | getNoteTextList(): *NoteText*\ []
   
   Gets an array of all NoteText items that have been added to the manager
   
   **Returns**\ : *NoteText*\ []
   
      array of all NoteText items
   
   



.. js:method:: Operators.NoteTextManager.getPinSphereMeshId

   .. rst-class:: sig-pretty-signature
   
      | getPinSphereMeshId(): (*None* \| :js:data:`~MeshId`\ )
   
   Retrieves the mesh id of the spherical head of the note pin, if there is one
   
   **Returns**\ : (*None* \| :js:data:`~MeshId`\ )
   
      MeshId of the note pin sphere, or null if there is none
   
   



.. js:method:: Operators.NoteTextManager.getPinStemMeshId

   .. rst-class:: sig-pretty-signature
   
      | getPinStemMeshId(): (*None* \| :js:data:`~MeshId`\ )
   
   Retrieves the mesh id of the stem of the note pin, if there is one
   
   **Returns**\ : (*None* \| :js:data:`~MeshId`\ )
   
      MeshId of the note pin stem, or null if there is none
   
   



.. js:method:: Operators.NoteTextManager.loadData

   .. rst-class:: sig-pretty-signature
   
      | 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*
   



.. js:method:: Operators.NoteTextManager.removeNote

   .. rst-class:: sig-pretty-signature
   
      | removeNote(**note**\ : *NoteText*\ ): *void*
   
   Removes a note from the manager
   
   **Parameters**
   
      **note**\ : *NoteText*
   
         NoteText to be removed from the manager
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.NoteTextManager.selectPin

   .. rst-class:: sig-pretty-signature
   
      | selectPin(**selection**\ : :js:class:`SelectionItem <Selection.SelectionItem>`\ ): *boolean*
   
   Attempts to set the active note to the one associated with the pins elected by the provided [[SelectionItem]]
   
   **Parameters**
   
      **selection**\ : :js:class:`SelectionItem <Selection.SelectionItem>`
   
         SelectionItem to attempt to find note from
   
   
   
   **Returns**\ : *boolean*
   



.. js:method:: Operators.NoteTextManager.setActiveItem

   .. rst-class:: sig-pretty-signature
   
      | 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*
   



.. js:method:: Operators.NoteTextManager.setActiveItemHandle

   .. rst-class:: sig-pretty-signature
   
      | 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*
   



.. js:method:: Operators.NoteTextManager.setIsolateActive

   .. rst-class:: sig-pretty-signature
   
      | setIsolateActive(**isolateActive**\ : *boolean*\ ): *void*
   
   Sets whether an isolate is currently active or not
   
   **Parameters**
   
      **isolateActive**\ : *boolean*
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.NoteTextManager.setNoteTextElement

   .. rst-class:: sig-pretty-signature
   
      | setNoteTextElement(**noteTextElement**\ : :js:class:`NoteTextElement <Operators.Markup.Note.NoteTextElement>`\ ): *void*
   
   Sets the note text element
   
   **Parameters**
   
      **noteTextElement**\ : :js:class:`NoteTextElement <Operators.Markup.Note.NoteTextElement>`
   
   
   **Returns**\ : *void*
   



.. js:method:: Operators.NoteTextManager.updatePinVisibility

   .. rst-class:: sig-pretty-signature
   
      | updatePinVisibility(): *Promise*
   
   Updates note pin visibility based on manager state (namely the current explode state)
   
   **Returns**\ : *Promise*
   





