Skip to content

HierarchyPointNode

type HierarchyPointNode<T> = object;

Defined in: packages/components/src/components/PhyloTree/types.ts:12

A node of the laid-out tree: the source Tree data, parent/children links, a stable id (as used by TreeSelection) and the pixel position the layout gave it.

Type Parameter
T
id: string;

Defined in: packages/components/src/components/PhyloTree/types.ts:14

data.id when present, else a positional path (stable across renders, not across re-sorts).


data: T;

Defined in: packages/components/src/components/PhyloTree/types.ts:15


parent: HierarchyPointNode<T> | null;

Defined in: packages/components/src/components/PhyloTree/types.ts:16


optional children?: HierarchyPointNode<T>[];

Defined in: packages/components/src/components/PhyloTree/types.ts:17


depth: number;

Defined in: packages/components/src/components/PhyloTree/types.ts:18


x: number;

Defined in: packages/components/src/components/PhyloTree/types.ts:20

Spread-axis position (rendered as the vertical position).


y: number;

Defined in: packages/components/src/components/PhyloTree/types.ts:22

Depth-axis position (rendered as the horizontal position).


optional radius?: number;

Defined in: packages/components/src/components/PhyloTree/types.ts:24

Distance from the centre, in pixels. Populated by "radial" only.


optional angle?: number;

Defined in: packages/components/src/components/PhyloTree/types.ts:26

Angle in radians, 0 pointing right. Populated by "radial" only.


optional collapsedLeafCount?: number;

Defined in: packages/components/src/components/PhyloTree/types.ts:28

For a collapsed clade drawn as a single tip: how many leaves it hides.