.. role:: ts-api-decorator

#################
SelectionOperator
#################

.. js:module:: Operators
   :noindex:

.. container:: ts-api-section

   .. js:class:: SelectionOperator



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Operators.SelectionOperator.addMapping`
   * :js:meth:`~Operators.SelectionOperator.clearMapping`
   * :js:meth:`~Operators.SelectionOperator.getPickConfig`
   * :js:meth:`~Operators.SelectionOperator.getSelectionButton`
   * :js:meth:`~Operators.SelectionOperator.setDoubleClickFitWorldEnabled`
   * :js:meth:`~Operators.SelectionOperator.setMapping`
   * :js:meth:`~Operators.SelectionOperator.setPickConfig`
   * :js:meth:`~Operators.SelectionOperator.setSelectionButton`





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

Methods
=======

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

addMapping
----------

.. js:method:: SelectionOperator.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:: SelectionOperator.clearMapping()



   Clears any button and key modifier mappings for the operator.


   :rtype: void

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

getPickConfig
-------------

.. js:method:: SelectionOperator.getPickConfig()



   Returns the [[PickConfig]] that will be passed to [[View.pickFromPoint]].


   :rtype: PickConfig

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

getSelectionButton
------------------

.. js:method:: SelectionOperator.getSelectionButton()



   Gets the button used for selection.

   :returns: Button


   :rtype: Button

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

setDoubleClickFitWorldEnabled
-----------------------------

.. js:method:: SelectionOperator.setDoubleClickFitWorldEnabled( doubleClickFitWorld)

   :param doubleClickFitWorld: None
   :type doubleClickFitWorld: boolean


   When enabled, a double click will fit the view to the model bounding box.


   :rtype: void

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

setMapping
----------

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

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

setPickConfig
-------------

.. js:method:: SelectionOperator.setPickConfig( config)

   :param config: None
   :type config: PickConfig


   Sets the [[PickConfig]] that will be passed to [[View.pickFromPoint]].


   :rtype: void

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

setSelectionButton
------------------

.. js:method:: SelectionOperator.setSelectionButton( button)

   :param button: None
   :type button: Button


   Sets the button used for selection


   :rtype: void

