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

.. js:class:: wv.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:`~wv.Floorplan.FloorplanManager.activate`
   * :js:meth:`~wv.Floorplan.FloorplanManager.deactivate`
   * :js:meth:`~wv.Floorplan.FloorplanManager.getAvatarNodeId`
   * :js:meth:`~wv.Floorplan.FloorplanManager.getConfiguration`
   * :js:meth:`~wv.Floorplan.FloorplanManager.getCurrentFloorNodeId`
   * :js:meth:`~wv.Floorplan.FloorplanManager.getFloorLock`
   * :js:meth:`~wv.Floorplan.FloorplanManager.insideOverlay`
   * :js:meth:`~wv.Floorplan.FloorplanManager.isActive`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setAutoActivate`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setAvatarColor`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setAvatarOpacity`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setAvatarOutlineColor`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setAvatarScale`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setBackgroundColor`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setBackgroundOpacity`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setBorderColor`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setBorderOpacity`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setConfiguration`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setCustomAvatar`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setFixedAvatarScale`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setFloorLock`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setFloorplanOrientation`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setOverlayAnchor`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setOverlayFeetPerPixel`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setOverlayOffset`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setOverlaySize`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setTrackCameraEnabled`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setUseTightBoundings`
   * :js:meth:`~wv.Floorplan.FloorplanManager.setZoomLevel`
   * :js:meth:`~wv.Floorplan.FloorplanManager.snapAvatarToPoint`
   
   



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


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

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



.. js:method:: wv.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:: wv.Floorplan.FloorplanManager.getAvatarNodeId

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



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

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



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

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



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

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



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

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



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

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



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

      .. rst-class:: sig-pretty-signature
      
         | setAutoActivate(**autoActivate**\ : :js:data:`FloorplanAutoActivation <wv.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 <wv.Floorplan.FloorplanAutoActivation>`
      
      
      **Returns**\ : *Promise*
      



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

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



.. js:method:: wv.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:: wv.Floorplan.FloorplanManager.setAvatarOutlineColor

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



.. js:method:: wv.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:: wv.Floorplan.FloorplanManager.setBackgroundColor

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



.. js:method:: wv.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:: wv.Floorplan.FloorplanManager.setBorderColor

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



.. js:method:: wv.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:: wv.Floorplan.FloorplanManager.setConfiguration

      .. rst-class:: sig-pretty-signature
      
         | setConfiguration(**config**\ : :js:class:`FloorplanConfig <wv.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 <wv.Floorplan.FloorplanConfig>`
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.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:: wv.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:: wv.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:: wv.Floorplan.FloorplanManager.setFloorplanOrientation

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



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

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



.. js:method:: wv.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:: wv.Floorplan.FloorplanManager.setOverlayOffset

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



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

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



.. js:method:: wv.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:: wv.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:: wv.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:: wv.Floorplan.FloorplanManager.snapAvatarToPoint

      .. rst-class:: sig-pretty-signature
      
         | snapAvatarToPoint(**point**\ : :js:class:`Point2 <wv.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 <wv.Point2>`
      
      
            Point in canvas within overlay
      
      
      
      **Returns**\ : *void*
      




