fn

dropIndexAt

The boundary a vertical position points at: k means "before row k", and rows.length is the end. Rows are in document order, so the answer is a binary search over their midpoints — no hit-testing, no DOM.

Signature

ts
export function dropIndexAt(rows: readonly BlockRow[], y: number): number{ ... }

Parameters

ParameterTypeDescription
rowsreadonly BlockRow[]—
ynumber—

Returns

number