.. role:: ts-api-decorator

################
SelectionManager
################

.. js:module:: Selection
   :noindex:

.. container:: ts-api-section

   .. js:class:: SelectionManager

      This class provides the main interface into the selection functionality of the viewer. The class manages a list of selection items that are optionally highlighted as the user selects objects in the scene.



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Selection.SelectionManager.add`
   * :js:meth:`~Selection.SelectionManager.advanceIncrementalSelection`
   * :js:meth:`~Selection.SelectionManager.beginConvexPolyhedronSelection`
   * :js:meth:`~Selection.SelectionManager.beginRayDrillSelection`
   * :js:meth:`~Selection.SelectionManager.beginScreenSelectByArea`
   * :js:meth:`~Selection.SelectionManager.beginSphereSelection`
   * :js:meth:`~Selection.SelectionManager.clear`
   * :js:meth:`~Selection.SelectionManager.contains`
   * :js:meth:`~Selection.SelectionManager.containsParent`
   * :js:meth:`~Selection.SelectionManager.each`
   * :js:meth:`~Selection.SelectionManager.endIncrementalSelection`
   * :js:meth:`~Selection.SelectionManager.exportSelectionData`
   * :js:meth:`~Selection.SelectionManager.getFirst`
   * :js:meth:`~Selection.SelectionManager.getHighlightFaceElementSelection`
   * :js:meth:`~Selection.SelectionManager.getHighlightLineElementSelection`
   * :js:meth:`~Selection.SelectionManager.getHighlightNodeSelection`
   * :js:meth:`~Selection.SelectionManager.getHighlightPointElementSelection`
   * :js:meth:`~Selection.SelectionManager.getIgnoreEntityWhenTogglingChildSelection`
   * :js:meth:`~Selection.SelectionManager.getLast`
   * :js:meth:`~Selection.SelectionManager.getNodeElementSelectionColor`
   * :js:meth:`~Selection.SelectionManager.getNodeElementSelectionHighlightMode`
   * :js:meth:`~Selection.SelectionManager.getNodeElementSelectionOutlineColor`
   * :js:meth:`~Selection.SelectionManager.getNodeSelectionColor`
   * :js:meth:`~Selection.SelectionManager.getNodeSelectionHighlightMode`
   * :js:meth:`~Selection.SelectionManager.getNodeSelectionOutlineColor`
   * :js:meth:`~Selection.SelectionManager.getPickTolerance`
   * :js:meth:`~Selection.SelectionManager.getPruneSelectionDescendants`
   * :js:meth:`~Selection.SelectionManager.getResult`
   * :js:meth:`~Selection.SelectionManager.getResults`
   * :js:meth:`~Selection.SelectionManager.getSelectParentIfSelected`
   * :js:meth:`~Selection.SelectionManager.getSelectedLayers`
   * :js:meth:`~Selection.SelectionManager.getSelectedTypes`
   * :js:meth:`~Selection.SelectionManager.getSelectionFilter`
   * :js:meth:`~Selection.SelectionManager.getSingleEntityToggleModeEnabled`
   * :js:meth:`~Selection.SelectionManager.getSuppressImplicitRemovalCallback`
   * :js:meth:`~Selection.SelectionManager.isNodeSelected`
   * :js:meth:`~Selection.SelectionManager.isSelected`
   * :js:meth:`~Selection.SelectionManager.loadSelectionData`
   * :js:meth:`~Selection.SelectionManager.remove`
   * :js:meth:`~Selection.SelectionManager.selectAllFromPoint`
   * :js:meth:`~Selection.SelectionManager.selectAllFromRay`
   * :js:meth:`~Selection.SelectionManager.selectFromPoint`
   * :js:meth:`~Selection.SelectionManager.selectFromRay`
   * :js:meth:`~Selection.SelectionManager.selectLayer`
   * :js:meth:`~Selection.SelectionManager.selectNode`
   * :js:meth:`~Selection.SelectionManager.selectType`
   * :js:meth:`~Selection.SelectionManager.set`
   * :js:meth:`~Selection.SelectionManager.setHighlightFaceElementSelection`
   * :js:meth:`~Selection.SelectionManager.setHighlightLineElementSelection`
   * :js:meth:`~Selection.SelectionManager.setHighlightNodeSelection`
   * :js:meth:`~Selection.SelectionManager.setHighlightPointElementSelection`
   * :js:meth:`~Selection.SelectionManager.setIgnoreEntityWhenTogglingChildSelection`
   * :js:meth:`~Selection.SelectionManager.setNodeElementSelectionColor`
   * :js:meth:`~Selection.SelectionManager.setNodeElementSelectionHighlightMode`
   * :js:meth:`~Selection.SelectionManager.setNodeElementSelectionOutlineColor`
   * :js:meth:`~Selection.SelectionManager.setNodeSelectionColor`
   * :js:meth:`~Selection.SelectionManager.setNodeSelectionHighlightMode`
   * :js:meth:`~Selection.SelectionManager.setNodeSelectionOutlineColor`
   * :js:meth:`~Selection.SelectionManager.setPickTolerance`
   * :js:meth:`~Selection.SelectionManager.setPruneSelectionDescendants`
   * :js:meth:`~Selection.SelectionManager.setSelectParentIfSelected`
   * :js:meth:`~Selection.SelectionManager.setSelectionFilter`
   * :js:meth:`~Selection.SelectionManager.setSingleEntityToggleModeEnabled`
   * :js:meth:`~Selection.SelectionManager.setSuppressImplicitRemovalCallback`
   * :js:meth:`~Selection.SelectionManager.size`
   * :js:meth:`~Selection.SelectionManager.toggle`





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

Methods
=======

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

add
---

.. js:method:: SelectionManager.add( itemOrItems, suppressCallback)

   :param itemOrItems: A selectionItem or selectionItem array that will be added to the current selection set.
   :type itemOrItems: null | NodeSelectionItem | [NodeSelectionItem]
   :param suppressCallback: Optional boolean param to suppress the selectionArray callbacks calls to this generate.
   :type suppressCallback: boolean


   Manually adds an item or array of items to the selection set.
   Triggers a selection event.


   :rtype: void

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

advanceIncrementalSelection
---------------------------

.. js:method:: SelectionManager.advanceIncrementalSelection( handle, predicate)

   :param handle: The handle to an active area selection context.
   :type handle: IncrementalSelectionId
   :param predicate: An optional function that returns ``true`` if a given [[NodeSelectionItem]] should be added to the selection set. If ``false`` is returned, the item will not be added.
   :type predicate: null | function


   Adds the next batch of instances selected by the supplied selection
   context to the selection set.

   :returns: ``true`` if there are possibly more items to select and ``false`` if not.


   :rtype: Promise <boolean>




   .. js:function:: predicate( item)
      :noindex:

      :param item: None
      :type item: NodeSelectionItem


      :rtype: Promise <boolean>



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

beginConvexPolyhedronSelection
------------------------------

.. js:method:: SelectionManager.beginConvexPolyhedronSelection( volumePlanes, heuristicOrigin, config)

   :param volumePlanes: The planes used to define volume. A point p is inside the volume if and only if (plane.determineSide(p) == true) for all supplied planes.
   :type volumePlanes: [Plane]
   :param heuristicOrigin: A point used to compute distances against for ordering returned results. This is typically (but not necessarily) the center of the volume.
   :type heuristicOrigin: Point3
   :param config: The configuration object used for this selection operation.
   :type config: IncrementalPickConfig


   Creates a new and active selection context for the provided selection volume.
   The selection volume is a convex polyhedron defined by the bounded intersection of its half-spaces.

   :returns: The handle for the selection context.


   :rtype: Promise <IncrementalSelectionId>

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

beginRayDrillSelection
----------------------

.. js:method:: SelectionManager.beginRayDrillSelection( rayCssOrigin, rayCssBoxRadius, config, view)

   :param rayCssOrigin: The coordinate in css pixel space for the selection ray's origin.
   :type rayCssOrigin: Point2
   :param rayCssBoxRadius: The radius around the ray in css pixel space used for line and point selection proximity.
   :type rayCssBoxRadius: number
   :param config: The configuration object used for this selection operation.
   :type config: IncrementalPickConfig
   :param view: The view to use when projecting the point into the scene.
   :type view: View


   Creates a new and active selection context for the provided selection ray.
   The ray is created at the supplied ray origin and is cast into the scene.
   Faces are selected if they lie along the ray.
   Lines and points are selected if they lie within the ray's box radius.

   Note: Somewhat confusingly ray drill selection is actually a selection by volume.
   The provided ray origin and radius are used to create a frustum to preform the selection.
   This has some consequences. For example, the ``SelectionResult``s returned by advancing a
   ray drill selection will not have selection positions, since they were not selected at
   a single point.

   :returns: The handle for the selection context.


   :rtype: Promise <IncrementalSelectionId>

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

beginScreenSelectByArea
-----------------------

.. js:method:: SelectionManager.beginScreenSelectByArea( areaCssMin, areaCssMax, config, view)

   :param areaCssMin: The minimum coordinate in css pixel space for the selection window.
   :type areaCssMin: Point2
   :param areaCssMax: The maximum coordinate in css pixel space for the selection window.
   :type areaCssMax: Point2
   :param config: The configuration object used for this selection operation.
   :type config: IncrementalPickConfig
   :param view: The view to use when projecting the point into the scene.
   :type view: View


   Creates a new and active selection context for the provided selection window.

   :returns: The handle for the selection context.


   :rtype: Promise <IncrementalSelectionId>

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

beginSphereSelection
--------------------

.. js:method:: SelectionManager.beginSphereSelection( sphereCenter, sphereRadius, config)

   :param sphereCenter: The center of the selection sphere.
   :type sphereCenter: Point3
   :param sphereRadius: The radius of the selection sphere.
   :type sphereRadius: number
   :param config: The configuration object used for this selection operation.
   :type config: IncrementalPickConfig


   Creates a new and active selection context for the provided selection sphere.

   :returns: The handle for the selection context.


   :rtype: Promise <IncrementalSelectionId>

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

clear
-----

.. js:method:: SelectionManager.clear( triggerCallback)

   :param triggerCallback: triggers a null selection callback when true.
   :type triggerCallback: boolean


   Removes all items from the selection set.


   :rtype: void

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

contains
--------

.. js:method:: SelectionManager.contains( item)

   :param item: None
   :type item: SelectionItem


   :rtype: boolean

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

containsParent
--------------

.. js:method:: SelectionManager.containsParent( item)

   :param item: None
   :type item: NodeSelectionItem


   Checks if the parent of a selection item is in the selection set.

   :returns: parent selection item, or null if not found


   :rtype: null | NodeSelectionItem

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

each
----

.. js:method:: SelectionManager.each( func)

   :param func: a function to be called for every selection item.
   :type func: function


   Iterates over all selection items.
   The function passed in will be called once for every selection item and will receive the item as its parameter.


   :rtype: void




   .. js:function:: func( s)
      :noindex:

      :param s: None
      :type s: NodeSelectionItem


      :rtype: void



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

endIncrementalSelection
-----------------------

.. js:method:: SelectionManager.endIncrementalSelection( handle)

   :param handle: The selection context to destroy.
   :type handle: IncrementalSelectionId


   Deactivates and destroys the provided selection context.


   :rtype: Promise <void>

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

exportSelectionData
-------------------

.. js:method:: SelectionManager.exportSelectionData()



   Exports selection objects so that they may be loaded back into the the system at a later time using loadSelectionData.

   :returns: exported selection data.


   :rtype: [object]

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

getFirst
--------

.. js:method:: SelectionManager.getFirst()



   Gets the least recent selection item.

   :returns: the least recently selected item (if any).


   :rtype: null | NodeSelectionItem

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

getHighlightFaceElementSelection
--------------------------------

.. js:method:: SelectionManager.getHighlightFaceElementSelection()



   Gets whether face elements will be highlighted on selection.

   :returns: boolean the current value for face element selection highlighting.


   :rtype: boolean

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

getHighlightLineElementSelection
--------------------------------

.. js:method:: SelectionManager.getHighlightLineElementSelection()



   Gets whether line elements will be highlighted on selection.

   :returns: boolean the current value for line element selection highlighting.


   :rtype: boolean

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

getHighlightNodeSelection
-------------------------

.. js:method:: SelectionManager.getHighlightNodeSelection()



   Gets whether nodes will be highlighted on selection.

   :returns: the current value for node selection highlighting.


   :rtype: boolean

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

getHighlightPointElementSelection
---------------------------------

.. js:method:: SelectionManager.getHighlightPointElementSelection()



   Gets whether point elements will be highlighted on selection.

   :returns: boolean the current value for point element selection highlighting.


   :rtype: boolean

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

getIgnoreEntityWhenTogglingChildSelection
-----------------------------------------

.. js:method:: SelectionManager.getIgnoreEntityWhenTogglingChildSelection()



   Gets whether ignore entity when toggling child selection mode is enabled.
   See also: [[setIgnoreEntityWhenTogglingChildSelection]]


   :rtype: boolean

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

getLast
-------

.. js:method:: SelectionManager.getLast()



   Gets the most recent selection item.

   :returns: the most recently selected item (if any).


   :rtype: null | NodeSelectionItem

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

getNodeElementSelectionColor
----------------------------

.. js:method:: SelectionManager.getNodeElementSelectionColor()



   Gets the color to use for face and line selection.

   :returns: the color used for face and line selection.


   :rtype: Color

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

getNodeElementSelectionHighlightMode
------------------------------------

.. js:method:: SelectionManager.getNodeElementSelectionHighlightMode()



   :rtype: SelectionHighlightMode

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

getNodeElementSelectionOutlineColor
-----------------------------------

.. js:method:: SelectionManager.getNodeElementSelectionOutlineColor()



   Gets the color to use for outlining face and line selection.

   :returns: color the color used for outlining face and line selection.


   :rtype: Color

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

getNodeSelectionColor
---------------------

.. js:method:: SelectionManager.getNodeSelectionColor()



   Gets the color to be used when selecting nodes.

   :returns: the color that is applied to a selected node.


   :rtype: Color

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

getNodeSelectionHighlightMode
-----------------------------

.. js:method:: SelectionManager.getNodeSelectionHighlightMode()



   Gets the highlighting mode for selected nodes.

   :returns: the current


   :rtype: SelectionHighlightMode

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

getNodeSelectionOutlineColor
----------------------------

.. js:method:: SelectionManager.getNodeSelectionOutlineColor()



   Gets the color to be used for outlining the node selection.

   :returns: the color for node selection outline.


   :rtype: Color

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

getPickTolerance
----------------

.. js:method:: SelectionManager.getPickTolerance()



   Gets the pick tolerance in pixels for line and point picking.

   The default value is 20.

   :returns: number Pick tolerance value in pixels


   :rtype: number

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

getPruneSelectionDescendants
----------------------------

.. js:method:: SelectionManager.getPruneSelectionDescendants()



   Gets whether descendant pruning is enabled.
   See also: [[setPruneSelectionDescendants]]


   :rtype: boolean

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

getResult
---------

.. js:method:: SelectionManager.getResult( index)

   :param index: index of selection item to get
   :type index: number


   Gets a selection at the specified index. The first selected item will be at index 0.

   :returns: the selection result at the given index.


   :rtype: null | NodeSelectionItem

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

getResults
----------

.. js:method:: SelectionManager.getResults()



   Gets all current selection items.

   :returns: array of all selection items.


   :rtype: [NodeSelectionItem]

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

getSelectParentIfSelected
-------------------------

.. js:method:: SelectionManager.getSelectParentIfSelected()



   Gets whether automatic parent selection is enabled.
   See also: [[setSelectParentIfSelected]]


   :rtype: boolean

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

getSelectedLayers
-----------------

.. js:method:: SelectionManager.getSelectedLayers()



   Gets all selected layers.


   :rtype: [string]

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

getSelectedTypes
----------------

.. js:method:: SelectionManager.getSelectedTypes()



   Gets all selected IFC types.


   :rtype: [string]

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

getSelectionFilter
------------------

.. js:method:: SelectionManager.getSelectionFilter()





   :returns: [[SelectionFilter]] function or null if none is set.


   :rtype: null | SelectionFilter

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

getSingleEntityToggleModeEnabled
--------------------------------

.. js:method:: SelectionManager.getSingleEntityToggleModeEnabled()



   Gets whether single entity toggle mode is enabled.
   See also: [[setSingleEntityToggleModeEnabled]]


   :rtype: boolean

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

getSuppressImplicitRemovalCallback
----------------------------------

.. js:method:: SelectionManager.getSuppressImplicitRemovalCallback()



   Gets whether implicit removal callbacks are being suppressed
   See also: [[setSuppressImplicitRemovalCallback]]


   :rtype: boolean

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

isNodeSelected
--------------

.. js:method:: SelectionManager.isNodeSelected( nodeId)

   :param nodeId: Node to check for
   :type nodeId: number


   Checks whether a node, or its parents, appear in the selection set or not.
   Note: for the purposes of this function element selections on a node
   are considered the same as node selection.

   :returns: ``true`` if the node or its parents appear in the selection set. ``false`` otherwise


   :rtype: boolean

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

isSelected
----------

.. js:method:: SelectionManager.isSelected( item)

   :param item: None
   :type item: SelectionItem


   :rtype: boolean

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

loadSelectionData
-----------------

.. js:method:: SelectionManager.loadSelectionData( datas)

   :param datas: None
   :type datas: string | [object]


   Loads serialized selection items exported using [[exportSelectionData]] back into the [[SelectionManager]].
   The current selection will be cleared. A selection event will be triggered for each loaded item.
   This method should not be called before the [[CallbackMap.modelStructureReady]] callback has been triggered.


   :rtype: void

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

remove
------

.. js:method:: SelectionManager.remove( itemOrItems, suppressCallback)

   :param itemOrItems: A selectionItem or an array of selection items that will be removed from the current selection set.
   :type itemOrItems: NodeSelectionItem | [NodeSelectionItem]
   :param suppressCallback: Optional boolean param to suppress the selectionArray callbacks calls to this generate.
   :type suppressCallback: boolean


   Manually removes an item or an array of items from the selection set.
   Triggers a selection event.


   :rtype: void

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

selectAllFromPoint
------------------

.. js:method:: SelectionManager.selectAllFromPoint( point, config, selectionMode, view)

   :param point: The canvas position to select from.
   :type point: Point2
   :param config: The configuration object used for this picking operation.
   :type config: PickConfig
   :param selectionMode: The mode to use for this selection.
   :type selectionMode: SelectionMode
   :param view: The view to use when projecting the point into the scene.
   :type view: View


   Performs a selection operation from the given position on the canvas. All candidate entities are selected.
   This method triggers a selection event.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

selectAllFromRay
----------------

.. js:method:: SelectionManager.selectAllFromRay( ray, config, selectionMode, view)

   :param ray: The world-space ray to perform the selection with.
   :type ray: Ray
   :param config: The configuration object used for this picking operation.
   :type config: PickConfig
   :param selectionMode: The mode to use for this selection.
   :type selectionMode: SelectionMode
   :param view: The view to use when projecting the point into the scene.
   :type view: View


   Performs a selection operation from the given world-space ray. All candidate entities are selected.
   This method triggers a selection event.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

selectFromPoint
---------------

.. js:method:: SelectionManager.selectFromPoint( point, config, selectionMode, view)

   :param point: The canvas position to select from.
   :type point: Point2
   :param config: The configuration object used for this picking operation.
   :type config: PickConfig
   :param selectionMode: The mode to use for this selection.
   :type selectionMode: SelectionMode
   :param view: The view to use when projecting the point into the scene.
   :type view: View


   Performs a selection operation from the given position on the canvas. The best candidate entity is selected.
   This method triggers a selection event.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

selectFromRay
-------------

.. js:method:: SelectionManager.selectFromRay( ray, config, selectionMode, view)

   :param ray: The world-space ray to perform the selection with.
   :type ray: Ray
   :param config: The configuration object used for this picking operation.
   :type config: PickConfig
   :param selectionMode: The mode to use for this selection.
   :type selectionMode: SelectionMode
   :param view: The view to use when projecting the point into the scene.
   :type view: View


   Performs a selection operation from the given world-space ray. The best candidate entity is selected.
   This method triggers a selection event.

   :returns: Promise that resolves when this operation has completed.


   :rtype: Promise <void>

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

selectLayer
-----------

.. js:method:: SelectionManager.selectLayer( layerName, selectionMode)

   :param layerName: None
   :type layerName: string
   :param selectionMode: None
   :type selectionMode: SelectionMode


   Adds all items in a layer to the selection set.


   :rtype: void

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

selectNode
----------

.. js:method:: SelectionManager.selectNode( nodeId, selectionMode)

   :param nodeId: nodeId of the node to select. Pass null to clear the selection.
   :type nodeId: null | number
   :param selectionMode: None
   :type selectionMode: SelectionMode


   Selects a node with the given Id.

   :returns: the selection type of this operation.


   :rtype: SelectionType

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

selectType
----------

.. js:method:: SelectionManager.selectType( genericType, selectionMode)

   :param genericType: None
   :type genericType: string
   :param selectionMode: None
   :type selectionMode: SelectionMode


   Adds all items with an IFC type to the selection set.


   :rtype: void

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

set
---

.. js:method:: SelectionManager.set( selection)

   :param selection: None
   :type selection: null | NodeSelectionItem


   Manually removes all currently selected items (if any) from the selection set and adds the supplied item.
   Triggers a selection event.


   :rtype: void

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

setHighlightFaceElementSelection
--------------------------------

.. js:method:: SelectionManager.setHighlightFaceElementSelection( highlightFaceElementSelection)

   :param highlightFaceElementSelection: value indicating whether selected face elements should be highlighted.
   :type highlightFaceElementSelection: boolean


   Sets whether face elements should be highlighted when a selection occurs.
   By default the system will automatically highlight face elements associated with a selection item.


   :rtype: Promise <void>

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

setHighlightLineElementSelection
--------------------------------

.. js:method:: SelectionManager.setHighlightLineElementSelection( highlightLineElementSelection)

   :param highlightLineElementSelection: value indicating whether selected line elements should be highlighted.
   :type highlightLineElementSelection: boolean


   Sets whether line elements should be highlighted when a selection occurs.
   By default the system will automatically highlight line elements associated with a selection item.


   :rtype: Promise <void>

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

setHighlightNodeSelection
-------------------------

.. js:method:: SelectionManager.setHighlightNodeSelection( highlightSelection)

   :param highlightSelection: None
   :type highlightSelection: boolean


   Sets whether nodes should be highlighted when a selection occurs.
   By default, the system will automatically highlight the node associated with a selection item.


   :rtype: Promise <void>

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

setHighlightPointElementSelection
---------------------------------

.. js:method:: SelectionManager.setHighlightPointElementSelection( highlightPointElementSelection)

   :param highlightPointElementSelection: value indicating whether selected point elements should be highlighted.
   :type highlightPointElementSelection: boolean


   Sets whether point elements should be highlighted when a selection occurs.
   By default the system will automatically highlight point elements associated with a selection item.


   :rtype: Promise <void>

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

setIgnoreEntityWhenTogglingChildSelection
-----------------------------------------

.. js:method:: SelectionManager.setIgnoreEntityWhenTogglingChildSelection( strictMode)

   :param strictMode: None
   :type strictMode: boolean


   Enables / disables ignore entity when toggling child selection mode.

   When enabled, a [[NodeSelectionItem]] that has a selected ancestor may only be toggled if it does not contain an entity selection.
   A selection item without an entity selection is usually generated from selecting a node via a model tree control.
   A selection item containing an entity selection is usually generated as a result of a viewport picking operation.

   This behavior is enabled by default.
   See Also: [[toggle]]


   :rtype: void

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

setNodeElementSelectionColor
----------------------------

.. js:method:: SelectionManager.setNodeElementSelectionColor( color)

   :param color: the color to apply to selected node elements.
   :type color: Color


   Sets the color to use for node element selection.
   This method should not be called before the sceneReady callback has been triggered.


   :rtype: Promise <void>

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

setNodeElementSelectionHighlightMode
------------------------------------

.. js:method:: SelectionManager.setNodeElementSelectionHighlightMode( highlightMode)

   :param highlightMode: the highlighting mode that will be applied to selected nodes.
   :type highlightMode: SelectionHighlightMode


   Sets the highlighting mode for selected node elements.
   The default behavior is to highlight the node element and render an overlay outline.
   This method should not be called before the sceneReady callback has been triggered.


   :rtype: Promise <void>

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

setNodeElementSelectionOutlineColor
-----------------------------------

.. js:method:: SelectionManager.setNodeElementSelectionOutlineColor( color)

   :param color: the color used for outlining face and line selection.
   :type color: Color


   Gets the color to use for outlining node element selection.
   This method should not be called before the sceneReady callback has been triggered.


   :rtype: Promise <void>

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

setNodeSelectionColor
---------------------

.. js:method:: SelectionManager.setNodeSelectionColor( color)

   :param color: the color to apply to the selected node.
   :type color: Color


   Sets the color to be used when selecting nodes.
   This method should not be called before the sceneReady callback has been triggered.


   :rtype: Promise <void>

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

setNodeSelectionHighlightMode
-----------------------------

.. js:method:: SelectionManager.setNodeSelectionHighlightMode( highlightMode)

   :param highlightMode: the highlighting mode that will be applied to selected nodes.
   :type highlightMode: SelectionHighlightMode


   Sets the highlighting mode for selected nodes. The default behavior is to highlight the node and render an overlay outline.
   This method should not be called before the sceneReady callback has been triggered.


   :rtype: Promise <void>

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

setNodeSelectionOutlineColor
----------------------------

.. js:method:: SelectionManager.setNodeSelectionOutlineColor( color)

   :param color: the color to apply to the node selection outline.
   :type color: Color


   Sets color for the node selection outline.
   This method should not be called before the sceneReady callback has been triggered.


   :rtype: Promise <void>

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

setPickTolerance
----------------

.. js:method:: SelectionManager.setPickTolerance( tolerance)

   :param tolerance: None
   :type tolerance: number


   Sets the pick tolerance in pixels for line and point picking.
   If a line or point is within this pixel tolerance of the click point,
   it will be prioritized over the face at the click position.

   The default value is 20.


   :rtype: void

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

setPruneSelectionDescendants
----------------------------

.. js:method:: SelectionManager.setPruneSelectionDescendants( pruneSelectionDescendants)

   :param pruneSelectionDescendants: None
   :type pruneSelectionDescendants: boolean


   Enables / disables descendant pruning and clears the current selection set.  When enabled, a parent and child will not be present in the same selection set.  This behavior is enabled by default.


   :rtype: void

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

setSelectParentIfSelected
-------------------------

.. js:method:: SelectionManager.setSelectParentIfSelected( selectParent)

   :param selectParent: None
   :type selectParent: boolean


   Enables / disables automatic parent selection.  When enabled, if a selected part is selected again, its parent will be selected.  This behavior is enabled by default.


   :rtype: void

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

setSelectionFilter
------------------

.. js:method:: SelectionManager.setSelectionFilter( selectionFilter)

   :param selectionFilter: function that manipulates the selected NodeId.
   :type selectionFilter: null | SelectionFilter


   This allows manipulating the selected NodeId.
   To reset the filter, set it to null.


   :rtype: void

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

setSingleEntityToggleModeEnabled
--------------------------------

.. js:method:: SelectionManager.setSingleEntityToggleModeEnabled( enabled)

   :param enabled: None
   :type enabled: boolean


   Enables / disables single entity toggle mode.

   When enabled, limits the selection set to containing only one entity selection for each node id.
   Toggling with an entity selection that has the same node id as a [[NodeSelectionItem]]
   already in the selection set will remove that item from the selection set.

   This behavior is disabled by default.
   See Also: [[toggle]]


   :rtype: void

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

setSuppressImplicitRemovalCallback
----------------------------------

.. js:method:: SelectionManager.setSuppressImplicitRemovalCallback( suppress)

   :param suppress: None
   :type suppress: boolean


   Sets whether to generate selectionArray callbacks with implicitly removed nodes.

   For example, consider the case where you have a parent node that has a multiple child nodes.
   Normally, if the parent begins selected and then a child is removed from the selection set
   there will be two selectionArray callbacks generated. The first will for the removal of the
   parent node. The second wil be for the addition of all of it's children except the one that was
   initially removed.

   When this behavior is enabled only a single selectionArray callback will be generated for the
   child node that was removed.

   This behavior is disabled by default.


   :rtype: void

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

size
----

.. js:method:: SelectionManager.size()



   Gets the number of selection items.

   :returns: the number of selected items.


   :rtype: number

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

toggle
------

.. js:method:: SelectionManager.toggle( item)

   :param item: None
   :type item: NodeSelectionItem


   Manually adds or removes an item from the selection set.
   Triggers a selection event.


   :rtype: void

