Editor model · function

rowIndexOf

Which row a node is, or -1 for a node that is not one.

function rowIndexOf(node: UiNode | null, prefix: string): number
import { rowIndexOf } from '@driftengine/editor';

Parameters

ParameterTypeDescription
nodeUiNode | null
prefixstring

In depth

Takes the node routeUiPointer returned, so a caller writes const at = rowIndexOf(routeUiPointer(...), TREE_ROW_PREFIX) and has the row it clicked.