Skip to content
pixi-silk
GitHub repository
Function

topLevelNodes

import { topLevelNodes } from 'pixi-silk/ui/layers';
function topLevelNodes<T>(
   rows: readonly FlatRow<T>[], 
   nodes: readonly T[], 
   getParent?: (node: T) => T | null
): T[];

The nodes of nodes that have no ancestor in nodes, in row order. Dragging a group moves its children with it.

Type Parameters#

Type Parameter
T

Parameters#

ParameterType
rowsreadonly FlatRow<T>[]
nodesreadonly T[]
getParent?(node: T) => T | null

Returns#

T[]