.. role:: ts-api-decorator

.. _OverlayUnit:

###########
OverlayUnit
###########

.. container:: ts-api-section

   Enumerates the unit types that an overlay viewport value may be.



.. container:: api-index-section

   .. rubric:: Enumeration Members

   .. rst-class:: api-index-list-item api-kind-enummember api-parent-kind-enum

   * :ref:`OverlayUnit.MinimumProportionOfCanvas`
   * :ref:`OverlayUnit.Pixels`
   * :ref:`OverlayUnit.ProportionOfCanvas`
   * :ref:`OverlayUnit.ProportionOfOtherDimension`





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

Enumeration Members
===================

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

.. _OverlayUnit.MinimumProportionOfCanvas:

MinimumProportionOfCanvas
-------------------------

The value is specified as a portion of the viewing canvas' minimum dimension.
If the canvas is resized, the viewport's dimensions will be recalculated based on the minimum
of the X and Y proportions.
This prevents the overlay from becoming oversized on very wide or very tall canvass.

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

.. _OverlayUnit.Pixels:

Pixels
------

The value is specified in CSS pixels.

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

.. _OverlayUnit.ProportionOfCanvas:

ProportionOfCanvas
------------------

The value is specified as a proportion of the viewing canvas.
If the canvas is resized, the viewport's dimensions will be recalculated accordingly.
In this case the value should be specified in a range of 0.0 to 1.0.

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

.. _OverlayUnit.ProportionOfOtherDimension:

ProportionOfOtherDimension
--------------------------

The value is specified as a proportion its corresponding parameters calculated value.
For example, given a viewport specified with width of 0.25 and unit type of ProportionOfCanvas,
specifying height with value of 1.0 and type of ProportionOfOtherDimension will ensure that the
calculated height value will be equal to the calculated width value should the canvas resize.
In this case the value should be specified in a range of 0.0 to 1.0.

