createAnchorFromElement
Anchors a popover just below an element — used for a clicked element, whose rect is exactly where the user is looking.
Import:
import { createAnchorFromElement } from 'obsidian-dev-utils/obsidian/popovers/popover-anchor';Signature:
function createAnchorFromElement(element: HTMLElement): PopoverAnchorParameters:
| Parameter | Type | Description |
|---|---|---|
element | HTMLElement | The element to anchor at. |
Returns: PopoverAnchor — The anchor.