.. role:: ts-api-decorator

############
SheetManager
############

.. container:: ts-api-section

   .. js:class:: SheetManager



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~SheetManager.constructor`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~SheetManager.deactivateSheets`
   * :js:meth:`~SheetManager.endComparison`
   * :js:meth:`~SheetManager.get3DNodes`
   * :js:meth:`~SheetManager.getActiveSheetId`
   * :js:meth:`~SheetManager.getBackgroundSelectionEnabled`
   * :js:meth:`~SheetManager.getBackgroundSheetEnabled`
   * :js:meth:`~SheetManager.getSheetBackgroundColor`
   * :js:meth:`~SheetManager.getSheetColor`
   * :js:meth:`~SheetManager.getSheetIds`
   * :js:meth:`~SheetManager.getSheetShadowColor`
   * :js:meth:`~SheetManager.isDrawingSheetActive`
   * :js:meth:`~SheetManager.setActiveSheetId`
   * :js:meth:`~SheetManager.setBackgroundSelectionEnabled`
   * :js:meth:`~SheetManager.setBackgroundSheetEnabled`
   * :js:meth:`~SheetManager.setSheetColors`
   * :js:meth:`~SheetManager.startComparison`





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

Constructors
============

.. container:: ts-api-section

   .. js:function:: SheetManager.constructor( viewer, engine, callbackManager, disableAutomaticBackgroundSheets)

      :param viewer: None
      :type viewer: WebViewer
      :param engine: None
      :type engine: ScEngine
      :param callbackManager: None
      :type callbackManager: CallbackManager
      :param disableAutomaticBackgroundSheets: None
      :type disableAutomaticBackgroundSheets: boolean


      :rtype: SheetManager



Methods
=======

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

deactivateSheets
----------------

.. js:method:: SheetManager.deactivateSheets( triggerCallback, ignoreFitNodes)

   :param triggerCallback: triggers a "sheetDeactivated" callback if true
   :type triggerCallback: boolean
   :param ignoreFitNodes: camera will not fit nodes if true
   :type ignoreFitNodes: boolean


   Deactivate sheets and only display 3D content

   :returns: promise that resolves when the operation has completed


   :rtype: Promise <void>

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

endComparison
-------------

.. js:method:: SheetManager.endComparison()



   Disables a visual comparison of two drawing sheets enabled by
   [[startSheetComparison]]. The ``Promise`` returned by that function
   should be waited upon before calling [[endSheetComparison]].


   :rtype: Promise <void>

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

get3DNodes
----------

.. js:method:: SheetManager.get3DNodes()



   Returns Ids of sheet nodes which contain 3D data.


   :rtype: [number]

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

getActiveSheetId
----------------

.. js:method:: SheetManager.getActiveSheetId()





   :returns: gets the id of the current active sheet. null if none has been set.


   :rtype: null | number

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

getBackgroundSelectionEnabled
-----------------------------

.. js:method:: SheetManager.getBackgroundSelectionEnabled()



   Gets the current state of the background sheet.

   :returns: ``true`` if enabled and ``false`` otherwise.


   :rtype: boolean

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

getBackgroundSheetEnabled
-------------------------

.. js:method:: SheetManager.getBackgroundSheetEnabled()



   Gets the current state of the background sheet.

   :returns: ``true`` if enabled and ``false`` otherwise.


   :rtype: boolean

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

getSheetBackgroundColor
-----------------------

.. js:method:: SheetManager.getSheetBackgroundColor()



   Gets the sheet Background Color.


   :rtype: Color

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

getSheetColor
-------------

.. js:method:: SheetManager.getSheetColor()



   Gets the Sheet Color.


   :rtype: Color

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

getSheetIds
-----------

.. js:method:: SheetManager.getSheetIds()





   :returns: an array of 2D [[SheetId]]s.


   :rtype: [number]

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

getSheetShadowColor
-------------------

.. js:method:: SheetManager.getSheetShadowColor()



   Gets the Sheet Shadow Color.


   :rtype: Color

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

isDrawingSheetActive
--------------------

.. js:method:: SheetManager.isDrawingSheetActive()





   :returns: true if a drawing sheet is activated, false otherwise


   :rtype: boolean

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

setActiveSheetId
----------------

.. js:method:: SheetManager.setActiveSheetId( activeSheetId, isolateNodes, fitNodes)

   :param activeSheetId: id of the sheet which will be activated.
   :type activeSheetId: number
   :param isolateNodes: indicates whether the nodes in the sheet should be isolated
   :type isolateNodes: boolean
   :param fitNodes: indicates whether a fit world should be performed after isolating the nodes.  Note: This parameter has no effect if ``isolateNodes`` is ``false``.
   :type fitNodes: boolean


   Sets the id of the current active sheet

   :returns: promise that resolves when the operation has completed


   :rtype: Promise <void>

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

setBackgroundSelectionEnabled
-----------------------------

.. js:method:: SheetManager.setBackgroundSelectionEnabled( enabled)

   :param enabled: None
   :type enabled: boolean


   Sets whether the background for 2D drawings is selectable. By default it is not.
   2D drawings have an invisible selection plane with a single face. Note that this setting
   is unaffected by the background-sheet enable setting.


   :rtype: Promise <void>

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

setBackgroundSheetEnabled
-------------------------

.. js:method:: SheetManager.setBackgroundSheetEnabled( enabled)

   :param enabled: None
   :type enabled: boolean


   Enables or disables the background sheet used for 2D drawings.


   :rtype: Promise <void>

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

setSheetColors
--------------

.. js:method:: SheetManager.setSheetColors( backgroundColor, sheetColor, sheetShadowColor)

   :param backgroundColor: viewer background color.
   :type backgroundColor: Color
   :param sheetColor: sheet background color.
   :type sheetColor: Color
   :param sheetShadowColor: sheet shadow effect color.
   :type sheetShadowColor: Color


   Sets custom sheet colors.


   :rtype: Promise <void>

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

startComparison
---------------

.. js:method:: SheetManager.startComparison( sheetId1, sheetId2[, config])

   :param sheetId1: the drawing sheet to compare against ``sheetId2``
   :type sheetId1: number
   :param sheetId2: the drawing sheet to compare against ``sheetId1``
   :type sheetId2: number
   :param config: :ts-api-decorator:`optional` settings controlling the behavior of the comparison
   :type config: ComparisonConfig


   Enables a visual comparison of two drawing sheets. The nodes specified
   by ``sheetId1`` are filled with one color, the nodes specified by
   ``sheetId2`` with another color, and overlapping areas are filled
   with a third color.

   See [[endSheetComparison]], [[View.startComparison]].


   :rtype: Promise <void>

