.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


#############
MeasureMarkup
#############

.. js:class:: wv.Operators.Markup.Measure.MeasureMarkup

   Base class for Measure Markup. It should not be used directly.
   
   
   Index
   =====
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wv.Operators.Markup.Measure.MeasureMarkup.uniqueId`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.getClassName`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.getMeasurementText`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.getMeasurementValue`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.getName`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.getUnitMultiplier`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.getVisibility`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.hit`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.hitWithTolerance`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.isMarkupValid`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.onDeselect`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.onSelect`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.remove`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.setMeasurementText`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.setName`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.setVisibility`
   * :js:meth:`~wv.Operators.Markup.Measure.MeasureMarkup.toJson`
   
   



.. rst-class:: kind-group kind-properties

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


.. js:data:: wv.Operators.Markup.Measure.MeasureMarkup.uniqueId

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | uniqueId: *string*
      



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

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


.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.getClassName

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getClassName(): *string*
      
      Gets the fully qualified class name for this markup item. E.g. "Communicator.Markup.Redline.RedlineCircle"
      
      **Returns**\ : *string*
      
      
         fully qualified class name
      
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.getMeasurementText

      .. rst-class:: sig-pretty-signature
      
         | getMeasurementText(): *string*
      
      Gets the text for this measurement. By default this will contain the measurement value and units for the model in the cases where the measurement is a distance. In other cases it will contain the angle in degrees.
      
      **Returns**\ : *string*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.getMeasurementValue

      .. rst-class:: sig-pretty-signature
      
         | getMeasurementValue(): *number*
      
      Returns the unit agnostic value for this measurement. In the case where this value represents distance, use [[getUnitMultiplier]] to determine the measurement units. In other cases, this value will be the angle measurement in degrees.
      
      **Returns**\ : *number*
      
      
         the measurement value
      
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.getName

      .. rst-class:: sig-pretty-signature
      
         | getName(): *string*
      
      Gets the name of this measurement.
      
      **Returns**\ : *string*
      
      
         the measurement name
      
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.getUnitMultiplier

      .. rst-class:: sig-pretty-signature
      
         | getUnitMultiplier(): *number*
      
      Returns the unit multiplier incorporated into the measurement value. This number is a multiplier of millimeters (for example inches will be ``25.4``\ ). The default value is ``1.0``\ .
      
      **Returns**\ : *number*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.getVisibility

      .. rst-class:: sig-pretty-signature
      
         | getVisibility(): *boolean*
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.hit

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | hit(**_point**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ ): *boolean*
      
      Called when a hit test is performed on this markup item.
      
      **Parameters**
      
      
         **_point**\ : :js:class:`Point2 <wv.Point2>`
      
      
            position in window where the hit test is being performed.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the projection where the hit test occurred.
      
      
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether this item was picked
      
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.hitWithTolerance

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | hitWithTolerance(**_point**\ : :js:class:`Point2 <wv.Point2>`\ , **_view**\ : :js:class:`IView <wv.IView>`\ , **_pickTolerance**\ : *number*\ ): *boolean*
      
      Called when a hit test is performed on this markup item.
      
      **Parameters**
      
      
         **_point**\ : :js:class:`Point2 <wv.Point2>`
      
      
            position in window where the hit test is being performed.
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the projection where the hit test occurred.
      
      
         **_pickTolerance**\ : *number*
      
      
            amount of tolerance allowed for a hit in pixels.
      
      
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether this item was picked
      
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.isMarkupValid

      .. rst-class:: sig-pretty-signature
      
         | isMarkupValid(): *boolean*
      
      Returns whether the measurement markup is valid. Override in subclasses when needed.
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.onDeselect

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | onDeselect(): *void*
      
      Called when this markup item is deselected by the system
      
      **Returns**\ : *void*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.onSelect

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | onSelect(**_view**\ : :js:class:`IView <wv.IView>`\ ): *void*
      
      Called when this markup item is selected by the system from a given view.
      
      **Parameters**
      
      
         **_view**\ : :js:class:`IView <wv.IView>`
      
      
            the view where the selection occurred
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.remove

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | remove(**_view**\ : (*None* | :js:class:`IView <wv.IView>`\ )): *void*
      
      Called when the MarkupItem is removed from a view from the system. Any cleanup that needs to be done should be performed in this method.
      
      **Parameters**
      
      
         **_view**\ : (*None* \| :js:class:`IView <wv.IView>`\ )
      
      
            the view to remove from, null if removed from everywhere.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.setMeasurementText

      .. rst-class:: sig-pretty-signature
      
         | setMeasurementText(**measurementText**\ : *string*\ ): *void*
      
      Sets the measurement text that is rendered with this measurement.
      
      **Parameters**
      
      
         **measurementText**\ : *string*
      
      
            the text to render with this measurement
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.setName

      .. rst-class:: sig-pretty-signature
      
         | setName(**name**\ : *string*\ ): *void*
      
      Sets the name of this measurement
      
      **Parameters**
      
      
         **name**\ : *string*
      
      
            the name to set
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.setVisibility

      .. rst-class:: sig-pretty-signature
      
         | setVisibility(**visibility**\ : *boolean*\ ): *void*
      
      **Parameters**
      
      
         **visibility**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Operators.Markup.Measure.MeasureMarkup.toJson

      .. rst-class:: sig-pretty-signature
      
         | toJson(): *object*
      
      Creates an object ready for JSON serialization.
      
      **Returns**\ : *object*
      
      
         The prepared object.
      
      




