Functions & Hooks

dispatchPress

function dispatchPress(nodes: (NodeHandle | null)[], handlers: Iterable<readonly [NodeHandle, () => void]>): boolean;

The topmost-wins dispatch on its own, for headless hit tests: feed it what Scene.handlesAt(surface.hitTest(x, y, precise)) names and the handlers you care about. Returns whether anything ran.

Only the topmost hit fires - a handler on a node underneath does not also run - exactly as useCanvasPress dispatches on a canvas.

Parameters

nodes

(NodeHandle | null)[]

handlers

Iterable<readonly [NodeHandle, () => void]>

Returns

boolean

On this page