Skip to content
pixi-silk
GitHub repository
Function

dropTarget

import { dropTarget } from 'pixi-silk/ui/layers';
function dropTarget<T>(
   rows: readonly FlatRow<T>[], 
   y: number, 
   rowHeight: number, 
   options?: DropTargetOptions<T>
): DropTarget<T> | null;

Where a drag over the rows drops, for a pointer at y (in row space, 0 at the top of the first row). The middle of a row that takes children drops inside it. The top and bottom halves drop between rows. Below the last row of a subtree, x picks how far out the drop goes. Returns null for a drop the tree must refuse, such as a node into itself.

Type Parameters#

Type Parameter
T

Parameters#

ParameterType
rowsreadonly FlatRow<T>[]
ynumber
rowHeightnumber
optionsDropTargetOptions<T>

Returns#

DropTarget<T> | null