Function: UseLayout()
UseLayout():
void
Defined in: app/hooks/eventSequence/useLayout.ts:40
Hook for applying a hierarchical tree layout to nodes in a React Flow diagram.
This hook utilizes the D3 library for tree layout and React Flow for managing nodes and edges in a flowchart-like UI. It triggers a layout re-calculation whenever the number of nodes changes and animates the nodes to their new positions.
Returns
void
Remarks
This hook is designed to work with D3's tree layout and is used for hierarchical tree-like structures. It also includes animation logic to smoothly transition nodes to their new positions. The hook ensures horizontal layout of the nodes
