PixiTreeAdapter
import type { PixiTreeAdapter } from 'pixi-silk/ui/layers';
What pixiTreeAdapter returns: an adapter for containers, plus the lock state it keeps.
Extends#
Required<Omit<TreeAdapter<Container>,"getIcon">>
Methods#
canHaveChildren()#
canHaveChildren(node: Container): boolean;
True when other nodes can be dropped inside. Default: when it has children.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
Returns#
boolean
Inherited from#
Required.canHaveChildren
getChildren()#
getChildren(node: Container): readonly Container<ContainerChild>[];
The children of node, in display order.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
Returns#
readonly Container<ContainerChild>[]
Inherited from#
Required.getChildren
getIcon()#
getIcon(node: Container): LayerIcon | null;
The row icon: the icon option’s result, or one picked from the kind of display object.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
Returns#
LayerIcon | null
getName()#
getName(node: Container): string;
The name shown in the row.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
Returns#
string
Inherited from#
Required.getName
getParent()#
getParent(node: Container): Container<ContainerChild> | null;
The parent of node, or null for the root. Without it the tree searches from the root.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
Returns#
Container<ContainerChild> | null
Inherited from#
Required.getParent
isLocked()#
isLocked(node: Container): boolean;
True when the node is locked. Without it, the row has no lock toggle.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
Returns#
boolean
Inherited from#
Required.isLocked
isVisible()#
isVisible(node: Container): boolean;
True when the node shows. Without it, the row has no eye toggle.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
Returns#
boolean
Inherited from#
Required.isVisible
move()#
move(
node: Container,
parent: Container,
index: number
): void;
Moves node under parent at index in display order, counted without node itself.
Without it, rows cannot be dragged.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
parent | Container |
index | number |
Returns#
void
Inherited from#
Required.move
setLocked()#
setLocked(node: Container, locked: boolean): void;
Sets the lock of node. Needed for the lock toggle to work.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
locked | boolean |
Returns#
void
Inherited from#
Required.setLocked
setName()#
setName(node: Container, name: string): void;
Renames node. Without it, double click, Enter and F2 do nothing.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
name | string |
Returns#
void
Inherited from#
Required.setName
setVisible()#
setVisible(node: Container, visible: boolean): void;
Shows or hides node. Needed for the eye toggle to work.
Parameters#
| Parameter | Type |
|---|---|
node | Container |
visible | boolean |
Returns#
void
Inherited from#
Required.setVisible