platform-bible-react
    Preparing search index...

    Function measureBox

    • Experimental

      The current viewport rect of a text range or an element, for a LivePopoverAnchorSource's measure.

      A target counts as unmeasurable only when it paints no box at all (getClientRects() is empty), never merely because its box is small: a zero-width or zero-height box — a collapsed caret, an empty element — is still a real, positioned point.

      Parameters

      • target: Element | Range

        The range or element to measure.

      Returns undefined | DOMRect

      The target's bounding rect in viewport coordinates, or undefined when it paints nothing: a range whose text the editor replaced (it collapsed to an element boundary that has no box), or an element with no layout because it or an ancestor is display: none, as inside an inactive rc-dock tab pane. This export is unstable and may change shape or disappear without notice