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

.. js:class:: SheetManager

   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~SheetManager.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :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
============

.. js:method:: SheetManager.constructor

   .. rst-class:: sig-pretty-signature
   
      | SheetManager(**viewer**\ : :js:class:`~IWebViewer`\ , **engine**\ : :js:class:`~IScEngine`\ , **callbackManager**\ : :js:class:`~ICallbackManager`\ , **disableAutomaticBackgroundSheets**\ : *boolean*\ ): :js:class:`~SheetManager`
   
   **Parameters**
   
      **viewer**\ : :js:class:`~IWebViewer`
   
      **engine**\ : :js:class:`~IScEngine`
   
      **callbackManager**\ : :js:class:`~ICallbackManager`
   
      **disableAutomaticBackgroundSheets**\ : *boolean*
   
   
   **Returns**\ : :js:class:`~SheetManager`
   





Methods
=======

.. js:method:: SheetManager.deactivateSheets

   .. rst-class:: sig-pretty-signature
   
      | deactivateSheets(**triggerCallback**\ : *boolean*\ ?, **ignoreFitNodes**\ : *boolean*\ ?): *Promise*
   
   Deactivate sheets and only display 3D content
   
   **Parameters**
   
      **triggerCallback**\ : *boolean* = true
   
         triggers a "sheetDeactivated" callback if true
   
   
      **ignoreFitNodes**\ : *boolean* = false
   
         camera will not fit nodes if true
   
   
   
   **Returns**\ : *Promise*
   
      promise that resolves when the operation has completed
   
   



.. js:method:: SheetManager.endComparison

   .. rst-class:: sig-pretty-signature
   
      | endComparison(): *Promise*
   
   Disables a visual comparison of two drawing sheets enabled by [[startSheetComparison]]. The ``Promise`` returned by that function should be waited upon before calling [[endSheetComparison]].
   
   **Returns**\ : *Promise*
   



.. js:method:: SheetManager.get3DNodes

   .. rst-class:: sig-pretty-signature
   
      | get3DNodes(): *number*\ []
   
   Returns Ids of sheet nodes which contain 3D data.
   
   **Returns**\ : *number*\ []
   



.. js:method:: SheetManager.getActiveSheetId

   .. rst-class:: sig-pretty-signature
   
      | getActiveSheetId(): (*None* \| *number*\ )
   
   **Returns**\ : (*None* \| *number*\ )
   
      gets the id of the current active sheet. null if none has been set.
   
   



.. js:method:: SheetManager.getBackgroundSelectionEnabled

   .. rst-class:: sig-pretty-signature
   
      | getBackgroundSelectionEnabled(): *boolean*
   
   Gets the current state of the background sheet.
   
   **Returns**\ : *boolean*
   
      ``true`` if enabled and ``false`` otherwise.
   
   



.. js:method:: SheetManager.getBackgroundSheetEnabled

   .. rst-class:: sig-pretty-signature
   
      | getBackgroundSheetEnabled(): *boolean*
   
   Gets the current state of the background sheet.
   
   **Returns**\ : *boolean*
   
      ``true`` if enabled and ``false`` otherwise.
   
   



.. js:method:: SheetManager.getSheetBackgroundColor

   .. rst-class:: sig-pretty-signature
   
      | getSheetBackgroundColor(): :js:class:`~Color`
   
   Gets the sheet Background Color.
   
   **Returns**\ : :js:class:`~Color`
   



.. js:method:: SheetManager.getSheetColor

   .. rst-class:: sig-pretty-signature
   
      | getSheetColor(): :js:class:`~Color`
   
   Gets the Sheet Color.
   
   **Returns**\ : :js:class:`~Color`
   



.. js:method:: SheetManager.getSheetIds

   .. rst-class:: sig-pretty-signature
   
      | getSheetIds(): *number*\ []
   
   **Returns**\ : *number*\ []
   
      an array of 2D [[SheetId]]s.
   
   



.. js:method:: SheetManager.getSheetShadowColor

   .. rst-class:: sig-pretty-signature
   
      | getSheetShadowColor(): :js:class:`~Color`
   
   Gets the Sheet Shadow Color.
   
   **Returns**\ : :js:class:`~Color`
   



.. js:method:: SheetManager.isDrawingSheetActive

   .. rst-class:: sig-pretty-signature
   
      | isDrawingSheetActive(): *boolean*
   
   **Returns**\ : *boolean*
   
      true if a drawing sheet is activated, false otherwise
   
   



.. js:method:: SheetManager.setActiveSheetId

   .. rst-class:: sig-pretty-signature
   
      | setActiveSheetId(**activeSheetId**\ : *number*\ , **isolateNodes**\ : *boolean*\ ?, **fitNodes**\ : *boolean*\ ?): *Promise*
   
   Sets the id of the current active sheet
   
   **Parameters**
   
      **activeSheetId**\ : *number*
   
         id of the sheet which will be activated.
   
   
      **isolateNodes**\ : *boolean* = true
   
         indicates whether the nodes in the sheet should be isolated
   
   
      **fitNodes**\ : *boolean* = true
   
         indicates whether a fit world should be performed after isolating the nodes.  Note: This parameter has no effect if ``isolateNodes`` is ``false``\ .
   
   
   
   **Returns**\ : *Promise*
   
      promise that resolves when the operation has completed
   
   



.. js:method:: SheetManager.setBackgroundSelectionEnabled

   .. rst-class:: sig-pretty-signature
   
      | setBackgroundSelectionEnabled(**enabled**\ : *boolean*\ ): *Promise*
   
   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.
   
   **Parameters**
   
      **enabled**\ : *boolean*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: SheetManager.setBackgroundSheetEnabled

   .. rst-class:: sig-pretty-signature
   
      | setBackgroundSheetEnabled(**enabled**\ : *boolean*\ ): *Promise*
   
   Enables or disables the background sheet used for 2D drawings.
   
   **Parameters**
   
      **enabled**\ : *boolean*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: SheetManager.setSheetColors

   .. rst-class:: sig-pretty-signature
   
      | setSheetColors(**backgroundColor**\ : :js:class:`~Color`\ , **sheetColor**\ : :js:class:`~Color`\ , **sheetShadowColor**\ : :js:class:`~Color`\ ): *Promise*
   
   Sets custom sheet colors.
   
   **Parameters**
   
      **backgroundColor**\ : :js:class:`~Color`
   
         viewer background color.
   
   
      **sheetColor**\ : :js:class:`~Color`
   
         sheet background color.
   
   
      **sheetShadowColor**\ : :js:class:`~Color`
   
         sheet shadow effect color.
   
   
   
   **Returns**\ : *Promise*
   



.. js:method:: SheetManager.startComparison

   .. rst-class:: sig-pretty-signature
   
      | startComparison(**sheetId1**\ : *number*\ , **sheetId2**\ : *number*\ , **config**\ : :js:class:`~ComparisonConfig`\ ): *Promise*
   
   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]].
   
   **Parameters**
   
      **sheetId1**\ : *number*
   
         the drawing sheet to compare against ``sheetId2``
   
   
      **sheetId2**\ : *number*
   
         the drawing sheet to compare against ``sheetId1``
   
   
      **config**\ : :js:class:`~ComparisonConfig`
   
         settings controlling the behavior of the comparison
   
   
   
   **Returns**\ : *Promise*
   





