
################
FloorplanManager
################

.. js:class:: Floorplan.FloorplanManager

   Main interface into the 2D floorplan functionality for the viewer. Can show a 2-dimensional floorplan of a BIM-enabled model. The floorplan display will include an avatar that represents the camera position of the 3D view.
   
   
   Index
   =====
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Floorplan.FloorplanManager.activate`
   * :js:meth:`~Floorplan.FloorplanManager.deactivate`
   * :js:meth:`~Floorplan.FloorplanManager.getAvatarNodeId`
   * :js:meth:`~Floorplan.FloorplanManager.getConfiguration`
   * :js:meth:`~Floorplan.FloorplanManager.getCurrentFloorNodeId`
   * :js:meth:`~Floorplan.FloorplanManager.getFloorLock`
   * :js:meth:`~Floorplan.FloorplanManager.insideOverlay`
   * :js:meth:`~Floorplan.FloorplanManager.isActive`
   * :js:meth:`~Floorplan.FloorplanManager.setAutoActivate`
   * :js:meth:`~Floorplan.FloorplanManager.setAvatarColor`
   * :js:meth:`~Floorplan.FloorplanManager.setAvatarOpacity`
   * :js:meth:`~Floorplan.FloorplanManager.setAvatarOutlineColor`
   * :js:meth:`~Floorplan.FloorplanManager.setAvatarScale`
   * :js:meth:`~Floorplan.FloorplanManager.setBackgroundColor`
   * :js:meth:`~Floorplan.FloorplanManager.setBackgroundOpacity`
   * :js:meth:`~Floorplan.FloorplanManager.setBorderColor`
   * :js:meth:`~Floorplan.FloorplanManager.setBorderOpacity`
   * :js:meth:`~Floorplan.FloorplanManager.setConfiguration`
   * :js:meth:`~Floorplan.FloorplanManager.setCustomAvatar`
   * :js:meth:`~Floorplan.FloorplanManager.setFixedAvatarScale`
   * :js:meth:`~Floorplan.FloorplanManager.setFloorLock`
   * :js:meth:`~Floorplan.FloorplanManager.setFloorplanOrientation`
   * :js:meth:`~Floorplan.FloorplanManager.setOverlayAnchor`
   * :js:meth:`~Floorplan.FloorplanManager.setOverlayFeetPerPixel`
   * :js:meth:`~Floorplan.FloorplanManager.setOverlayOffset`
   * :js:meth:`~Floorplan.FloorplanManager.setOverlaySize`
   * :js:meth:`~Floorplan.FloorplanManager.setTrackCameraEnabled`
   * :js:meth:`~Floorplan.FloorplanManager.setUseTightBoundings`
   * :js:meth:`~Floorplan.FloorplanManager.setZoomLevel`
   * :js:meth:`~Floorplan.FloorplanManager.snapAvatarToPoint`
   
   




Methods
=======

.. js:method:: Floorplan.FloorplanManager.activate

   .. rst-class:: sig-pretty-signature
   
      | activate(): *Promise*
   
   Activate the floorplan overlay.
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.deactivate

   .. rst-class:: sig-pretty-signature
   
      | deactivate(): *Promise*
   
   Deactivate the floorplan overlay. Once explicitly deactivated via this call, auto-activation will be suppressed for any new model that is loaded. Auto-activation can be reenabled by calling [[setAutoActivate]].
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.getAvatarNodeId

   .. rst-class:: sig-pretty-signature
   
      | getAvatarNodeId(): (*None* \| *number*\ )
   
   Gets the [[NodeId]] of the floorplan avatar.
   
   **Returns**\ : (*None* \| *number*\ )
   



.. js:method:: Floorplan.FloorplanManager.getConfiguration

   .. rst-class:: sig-pretty-signature
   
      | getConfiguration(): :js:class:`FloorplanConfig <Floorplan.FloorplanConfig>`
   
   Returns a copy of the current floorplan configuration.
   
   **Returns**\ : :js:class:`FloorplanConfig <Floorplan.FloorplanConfig>`
   



.. js:method:: Floorplan.FloorplanManager.getCurrentFloorNodeId

   .. rst-class:: sig-pretty-signature
   
      | getCurrentFloorNodeId(): (*None* \| *number*\ )
   
   Gets the [[NodeId]] of the current storey.
   
   **Returns**\ : (*None* \| *number*\ )
   



.. js:method:: Floorplan.FloorplanManager.getFloorLock

   .. rst-class:: sig-pretty-signature
   
      | getFloorLock(): *boolean*
   
   Returns ``true`` if displayed floor has been locked with [[setFloorLock]].
   
   **Returns**\ : *boolean*
   



.. js:method:: Floorplan.FloorplanManager.insideOverlay

   .. rst-class:: sig-pretty-signature
   
      | insideOverlay(**point**\ : :js:class:`~Point2`\ ): *boolean*
   
   Returns ``true`` if the given point is inside the floorplan overlay and ``false`` otherwise.
   
   **Parameters**
   
      **point**\ : :js:class:`~Point2`
   
   
   **Returns**\ : *boolean*
   



.. js:method:: Floorplan.FloorplanManager.isActive

   .. rst-class:: sig-pretty-signature
   
      | isActive(): *boolean*
   
   Returns ``true`` if the [[FloorplanManager]] is fully active.
   
   **Returns**\ : *boolean*
   



.. js:method:: Floorplan.FloorplanManager.setAutoActivate

   .. rst-class:: sig-pretty-signature
   
      | setAutoActivate(**autoActivate**\ : :js:data:`FloorplanAutoActivation <Floorplan.FloorplanAutoActivation>`\ ): *Promise*
   
   Sets the auto-activate capability for any models loaded after this call. See [[FloorplanConfig.autoActivate]] for detailed information.
   
   **Parameters**
   
      **autoActivate**\ : :js:data:`FloorplanAutoActivation <Floorplan.FloorplanAutoActivation>`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setAvatarColor

   .. rst-class:: sig-pretty-signature
   
      | setAvatarColor(**color**\ : :js:class:`~Color`\ ): *Promise*
   
   Sets the avatar primary color. See [[FloorplanConfig.avatarColor]] for detailed information.
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setAvatarOpacity

   .. rst-class:: sig-pretty-signature
   
      | setAvatarOpacity(**opacity**\ : *number*\ ): *Promise*
   
   Sets the avatar opacity. See [[FloorplanConfig.avatarOpacity]] for detailed information.
   
   **Parameters**
   
      **opacity**\ : *number*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setAvatarOutlineColor

   .. rst-class:: sig-pretty-signature
   
      | setAvatarOutlineColor(**color**\ : :js:class:`~Color`\ ): *Promise*
   
   Sets the avatar outline color. See [[FloorplanConfig.avatarOutlineColor]] for detailed information.
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setAvatarScale

   .. rst-class:: sig-pretty-signature
   
      | setAvatarScale(**scale**\ : *number*\ ): *Promise*
   
   Sets the avatar scale. See [[FloorplanConfig.avatarScale]] for detailed information.
   
   **Parameters**
   
      **scale**\ : *number*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setBackgroundColor

   .. rst-class:: sig-pretty-signature
   
      | setBackgroundColor(**color**\ : :js:class:`~Color`\ ): *Promise*
   
   Sets the overlay background color. See [[FloorplanConfig.backgroundColor]] for detailed information.
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setBackgroundOpacity

   .. rst-class:: sig-pretty-signature
   
      | setBackgroundOpacity(**opacity**\ : *number*\ ): *Promise*
   
   Sets the overlay background opacity. See [[FloorplanConfig.backgroundOpacity]] for detailed information.
   
   **Parameters**
   
      **opacity**\ : *number*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setBorderColor

   .. rst-class:: sig-pretty-signature
   
      | setBorderColor(**color**\ : :js:class:`~Color`\ ): *Promise*
   
   Sets the overlay border color. See [[FloorplanConfig.borderColor]] for detailed information.
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setBorderOpacity

   .. rst-class:: sig-pretty-signature
   
      | setBorderOpacity(**opacity**\ : *number*\ ): *Promise*
   
   Sets the overlay border opacity. See [[FloorplanConfig.borderOpacity]] for detailed information.
   
   **Parameters**
   
      **opacity**\ : *number*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setConfiguration

   .. rst-class:: sig-pretty-signature
   
      | setConfiguration(**config**\ : :js:class:`FloorplanConfig <Floorplan.FloorplanConfig>`\ ): *Promise*
   
   Updates the floorplan to use the given configuration. This function allows the user to set all configuration values with a single operation. There are also ``set<config-value>()`` functions for easily setting individual configuration values.
   
   Note that when using this function, all settings in the given configuration are used and thus overwrite any individual settings changed with a prior ``set<config-value>()`` call.
   
   All values from the passed configuration will be copied as part of this operation.
   
   **Parameters**
   
      **config**\ : :js:class:`FloorplanConfig <Floorplan.FloorplanConfig>`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setCustomAvatar

   .. rst-class:: sig-pretty-signature
   
      | setCustomAvatar(**customAvatarNodeId**\ : (*None* \| *number*\ )): *Promise*
   
   Sets a custom avatar. See [[FloorplanConfig.customAvatar]] for detailed information.
   
   **Parameters**
   
      **customAvatarNodeId**\ : (*None* \| *number*\ )
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setFixedAvatarScale

   .. rst-class:: sig-pretty-signature
   
      | setFixedAvatarScale(**fixedScale**\ : *boolean*\ ): *Promise*
   
   Sets the avatar size to fixed scale. See [[FloorplanConfig.fixedAvatarScale]] for detailed information.
   
   **Parameters**
   
      **fixedScale**\ : *boolean*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setFloorLock

   .. rst-class:: sig-pretty-signature
   
      | setFloorLock(**lock**\ : *boolean*\ ): *Promise*
   
   Locks floorplan to current floor such that changing floors will not change the displayed floorplan.
   
   **Parameters**
   
      **lock**\ : *boolean*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setFloorplanOrientation

   .. rst-class:: sig-pretty-signature
   
      | setFloorplanOrientation(**orientation**\ : :js:data:`~FloorplanOrientation`\ ): *Promise*
   
   Sets the floorplan display orientation. See [[FloorplanConfig.floorplanOrientation]] for detailed information.
   
   **Parameters**
   
      **orientation**\ : :js:data:`~FloorplanOrientation`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setOverlayAnchor

   .. rst-class:: sig-pretty-signature
   
      | setOverlayAnchor(**anchor**\ : :js:data:`~OverlayAnchor`\ ): *Promise*
   
   Sets the anchor position of the floorplan overlay window. See [[FloorplanConfig.overlayAnchor]] for detailed information.
   
   **Parameters**
   
      **anchor**\ : :js:data:`~OverlayAnchor`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setOverlayFeetPerPixel

   .. rst-class:: sig-pretty-signature
   
      | setOverlayFeetPerPixel(**feetPerPixel**\ : *number*\ ): *Promise*
   
   Sets the overlay scaling. See [[FloorplanConfig.overlayFeetPerPixel]] for detailed information.
   
   **Parameters**
   
      **feetPerPixel**\ : *number*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setOverlayOffset

   .. rst-class:: sig-pretty-signature
   
      | setOverlayOffset(**offset**\ : :js:class:`~Point2`\ ): *Promise*
   
   Sets the offset position of the floorplan overlay window. See [[FloorplanConfig.overlayOffset]] for detailed information.
   
   **Parameters**
   
      **offset**\ : :js:class:`~Point2`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setOverlaySize

   .. rst-class:: sig-pretty-signature
   
      | setOverlaySize(**size**\ : :js:class:`~Point2`\ , **widthUnits**\ : :js:data:`~OverlayUnit`\ , **heightUnits**\ : :js:data:`~OverlayUnit`\ ): *Promise*
   
   Sets the size of the floorplan overlay window. See [[FloorplanConfig.overlaySize]] for detailed information.
   
   **Parameters**
   
      **size**\ : :js:class:`~Point2`
   
      **widthUnits**\ : :js:data:`~OverlayUnit`
   
      **heightUnits**\ : :js:data:`~OverlayUnit`
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setTrackCameraEnabled

   .. rst-class:: sig-pretty-signature
   
      | setTrackCameraEnabled(**enabled**\ : *boolean*\ ): *Promise*
   
   Sets the floorplan tracking mode. See [[FloorplanConfig.trackCameraEnabled]] for detailed information.
   
   **Parameters**
   
      **enabled**\ : *boolean*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setUseTightBoundings

   .. rst-class:: sig-pretty-signature
   
      | setUseTightBoundings(**tightBoundings**\ : *boolean*\ ): *Promise*
   
   Makes floorplans use tight boundings during creation which can result in a better fit for the overlay. This involves recreating any already existing floorplans. This can be significantly more time consuming than using loose boundings if your floors are complex. Defaults to ``false``\ .
   
   **Parameters**
   
      **tightBoundings**\ : *boolean*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.setZoomLevel

   .. rst-class:: sig-pretty-signature
   
      | setZoomLevel(**zoomLevel**\ : *number*\ ): *Promise*
   
   Sets the overlay zoom level. See [[FloorplanConfig.zoomLevel]] for detailed information.
   
   **Parameters**
   
      **zoomLevel**\ : *number*
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Floorplan.FloorplanManager.snapAvatarToPoint

   .. rst-class:: sig-pretty-signature
   
      | snapAvatarToPoint(**point**\ : :js:class:`~Point2`\ ): *void*
   
   Moves the camera such that the avatar will appear at the provided point on the overlay. This is only available when the floorplan is not tracking the camera.
   
   **Parameters**
   
      **point**\ : :js:class:`~Point2`
   
         Point in canvas within overlay
   
   
   
   **Returns**\ : *void*
   





