.. role:: ts-api-decorator

###############################
MeasurePolylineDistanceOperator
###############################

.. js:module:: Operators.Measure
   :noindex:

.. container:: ts-api-section

   .. js:class:: MeasurePolylineDistanceOperator

      This operator allows you to create a polyline and measure its distance.
      Click to add points to the polyline.  A cursor will show where the point will be placed.
      The operator will perform vertex snapping by default.  Holding down the alt key will disable this feature.
      To complete a measurement, double click when placing a point to create an open line measurement, or single click on the first point to create a closed loop.
      When there is no active measurement being created, click on a text box to drag and reposition it relative to its anchor point.
      If a measurement is currently being created, pressing the Escape key will discard it, otherwise the last created measurement will be discarded.



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Operators.Measure.MeasurePolylineDistanceOperator._clearMeasurement`
   * :js:meth:`~Operators.Measure.MeasurePolylineDistanceOperator._pickExisting`
   * :js:meth:`~Operators.Measure.MeasurePolylineDistanceOperator.addMapping`
   * :js:meth:`~Operators.Measure.MeasurePolylineDistanceOperator.clearMapping`
   * :js:meth:`~Operators.Measure.MeasurePolylineDistanceOperator.setAnchor`
   * :js:meth:`~Operators.Measure.MeasurePolylineDistanceOperator.setMapping`





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

Methods
=======

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

_clearMeasurement
-----------------

.. js:method:: MeasurePolylineDistanceOperator._clearMeasurement()



   :rtype: void

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

_pickExisting
-------------

.. js:method:: MeasurePolylineDistanceOperator._pickExisting( selectPoint)

   :param selectPoint: None
   :type selectPoint: Point2


   :rtype: boolean

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

addMapping
----------

.. js:method:: MeasurePolylineDistanceOperator.addMapping( button, modifier)

   :param button: None
   :type button: Button
   :param modifier: None
   :type modifier: KeyModifiers


   Adds a button and key modifier mapping for the operator. If no mapping is provided, all combinations are considered valid.
   All mappings require a mouse button, but a key modifier is optional.


   :rtype: void

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

clearMapping
------------

.. js:method:: MeasurePolylineDistanceOperator.clearMapping()



   Clears any button and key modifier mappings for the operator.


   :rtype: void

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

setAnchor
---------

.. js:method:: MeasurePolylineDistanceOperator.setAnchor( anchor)

   :param anchor: None
   :type anchor: MeasurePolylineDistanceAnchor


   Sets the anchor type that will be set for markups created by this operator.


   :rtype: void

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

setMapping
----------

.. js:method:: MeasurePolylineDistanceOperator.setMapping( button, modifier)

   :param button: None
   :type button: Button
   :param modifier: None
   :type modifier: KeyModifiers


   Sets the button and key modifier mapping for the operator.


   :rtype: void

