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

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



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


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

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



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


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

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



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.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:: wv.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:: wv.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:: wv.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:: wv.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:: wv.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:: wv.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:: wv.Operators.NoteTextManager.getExplodeActive

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



.. js:method:: wv.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:: wv.Operators.NoteTextManager.getNoteTextElement

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



.. js:method:: wv.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:: wv.Operators.NoteTextManager.getPinSphereMeshId

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



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

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



.. js:method:: wv.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:: wv.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:: wv.Operators.NoteTextManager.selectPin

      .. rst-class:: sig-pretty-signature
      
         | selectPin(**selection**\ : :js:class:`SelectionItem <wv.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 <wv.Selection.SelectionItem>`
      
      
            SelectionItem to attempt to find note from
      
      
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.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:: wv.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:: wv.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:: wv.Operators.NoteTextManager.setNoteTextElement

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



.. js:method:: wv.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*
      




