Skip to content

frontend-web-editor


Function: useTreeData()

useTreeData(inputLevels, outputLevels, nodeWidth): object

Defined in: app/hooks/eventTree/useTreeData.ts:118

Generate the initial Event Tree graph (nodes and edges).

Builds a balanced binary tree of input levels with labelled edges and then appends end-state chains for each leaf (Sequence ID, Frequency, Release Category). Also generates the supporting column-nodes and hidden column edges.

Parameters

inputLevels

number

Number of functional-event levels to generate.

outputLevels

number

Number of end-state levels to generate.

nodeWidth

number

Node width used for layout and column positioning.

Returns

object

The complete initial node and edge set for the Event Tree.

edges

edges: Edge[]

nodes

nodes: Node[]