Skip to content

frontend-web-editor


Function: default()

default(clickedNodeId): () => void

Defined in: app/hooks/eventTree/useDeleteNodeClick.ts:23

Delete a visible node from the Event Tree while enforcing structural rules.

  • Prevents deletion if it would reduce the number of Sequence ID nodes below two.
  • Prevents deletion when non-output/non-invisible child nodes exist.
  • Converts a leaf to an invisible node when it has no siblings, otherwise removes it and rewires. Persists the updated graph after mutations.

Parameters

clickedNodeId

string

The id of the node to delete.

Returns

A function that performs the deletion when invoked.

(): void

Returns

void