Skip to content

resolveAnchor

resolveAnchor(anchor, vw, vh, pw, ph): object

Defined in: ui/src/UILayoutSystem.ts:124

Screen-space anchor resolution: compute the top-left position for a panel of size (pw, ph) within a viewport of size (vw, vh) such that the named corner of the panel aligns with the named corner of the viewport.

Anchor

number

number

number

number

object

x: number

y: number

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/ui.md.