MLightCAD
    Preparing search index...
    • Returns the reactive rectangle of the current viewer subtree.

      This function reads the rectangle previously registered by provideViewerRect. It is intended for floating panels, overlays, and other layout-aware descendants that need to align themselves to the current viewer host element.

      When no provider exists in the current component tree, the function returns a shared readonly zero rectangle as a safe fallback. That behavior keeps the API easy to consume in optional or test-only contexts without forcing every caller to guard for undefined.

      Returns Readonly<
          Ref<
              { height: number; left: number; top: number; width: number },
              { height: number; left: number; top: number; width: number },
          >,
      >

      A readonly reactive ref containing the current viewer rectangle, or a zero rectangle when no provider is available.