Skip to content

Documentation / @finchart/core / index / FocusAreaHost

Interface: FocusAreaHost ​

Defined in: packages/core/src/plot/capabilities.ts:228

Keyboard ownership contest — registered by extensions that route keys based on whose area the cursor is over.

In wiring that mounts one extension per pane, an extension that only knows its own area can't tell "the cursor left" apart from "the cursor went to someone else". The right question isn't "do I have an area" but "is there someone else contesting the keyboard" — an extension that has an area but doesn't contest keys, like axis drag, legend, or tooltip, doesn't count.

panes isn't handed over as-is because PaneApi has setYScale and addSeries on it — asking who your neighbor is and pushing your neighbor around are different privileges. It doesn't expose the chart's layout either: only a contestant knows about other contestants.

Consumers: @finchart/tools

Methods ​

claimFocusArea() ​

claimFocusArea(areaOf): FocusClaim

Defined in: packages/core/src/plot/capabilities.ts:235

Registers as a keyboard contestant. areaOf is called every time — a pane's position changes on resize or maximize, and a cached value would go stale by the next frame. null is first-class vocabulary — "not contesting right now" (disarmed, hidden, collapsed).

Parameters ​

areaOf ​

() => PlotArea | null

Returns ​

FocusClaim