Skip to content

API reference / Common / OverlayItem

Interface: OverlayItem ​

One piece of overlay chrome for a single frame. The manager pools the DOM element by key across frames, so a stable key (e.g. "pill:3") means "the same element, moved" rather than a teardown + rebuild.

Properties ​

PropertyDescription
key
string
Stable identity across frames (within the owning overlay id).
x
number
Viewport (CSS px) point the element's wrapper is translated to.
y
number
-
scale?
number
Scale folded into the wrapper transform (translate(x, y) scale(s)), for chrome that should scale with the content. Omit (or 1) for constant-size screen chrome.
create
() => HTMLElement
Build the element the first time this key appears.
update?
(el) => void
Per-frame refresh (text, size on zoom, handlers) of the pooled element.