emphasis

emphasis.focusContext

focusContext(nodeIds: string | string[], config?: FocusContextConfig): string

Start a focus+context effect that highlights a subset of nodes and dims all others.

The focused nodes are rendered at full opacity; non-focused nodes and edges are dimmed to a configurable alpha. The effect persists until stopped. To retarget an existing focus+context without a visual flicker, prefer retargetFocusContext.

Not undoable. Not recorded in history.

nodeIdsstring | string[]One or more node IDs that form the focused subset.
configFocusContextConfigOptional FocusContextConfig (dimAlpha, includedNeighbors).

Returns: string