.. role:: ts-api-decorator

###########
LineManager
###########

.. container:: ts-api-section

   .. js:class:: LineManager

      This class provides an interface to 3D line management related functions of the viewer.



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~LineManager.addLine`
   * :js:meth:`~LineManager.exportMarkup`
   * :js:meth:`~LineManager.getAllLines`
   * :js:meth:`~LineManager.getLineByNodeId`
   * :js:meth:`~LineManager.loadData`
   * :js:meth:`~LineManager.removeAllLines`
   * :js:meth:`~LineManager.removeLastLine`
   * :js:meth:`~LineManager.removeLine`





------------

Methods
=======

.. rst-class:: ts-api-section

addLine
-------

.. js:method:: LineManager.addLine( lineItem)

   :param lineItem: LineMarkup Object that will be added
   :type lineItem: LineMarkup


   Adds a new Line to the Line Manager


   :rtype: Promise <void>

.. rst-class:: ts-api-section

exportMarkup
------------

.. js:method:: LineManager.exportMarkup()





   :returns: JSON Array with line markup


   :rtype: [object]

.. rst-class:: ts-api-section

getAllLines
-----------

.. js:method:: LineManager.getAllLines()



   Return an array of line items.

   :returns: array of all line items.


   :rtype: [LineMarkup]

.. rst-class:: ts-api-section

getLineByNodeId
---------------

.. js:method:: LineManager.getLineByNodeId( id)

   :param id: None
   :type id: number


   Gets a line markup item associated with a node id.


   :rtype: null | LineMarkup

.. rst-class:: ts-api-section

loadData
--------

.. js:method:: LineManager.loadData( lineDataJson)

   :param lineDataJson: None
   :type lineDataJson: [any]


   Loads JSON markup data


   :rtype: Promise <[boolean]>

.. rst-class:: ts-api-section

removeAllLines
--------------

.. js:method:: LineManager.removeAllLines()



   Removes all line items.


   :rtype: Promise <void>

.. rst-class:: ts-api-section

removeLastLine
--------------

.. js:method:: LineManager.removeLastLine()



   Removes the most recently added line item.


   :rtype: Promise <void>

.. rst-class:: ts-api-section

removeLine
----------

.. js:method:: LineManager.removeLine( lineItem)

   :param lineItem: the line item to remove.
   :type lineItem: LineMarkup


   Removes an existing line item.


   :rtype: Promise <void>

