Skip to content

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 '@mnaoumov/obsidian-lib/popovers/popover-anchor';

Signature:

function createAnchorFromElement(element: HTMLElement): PopoverAnchor

Parameters:

Parameter Type Description
element HTMLElement The element to anchor at.

Returns: PopoverAnchor — The anchor.