Skip to content

frontend-web-editor


Function: grayOutBranch()

grayOutBranch(branchRootNode, branchId, currentNodes, currentEdges): OnGrayedState

Defined in: utils/treeUtils.ts:277

Grays out a particular branch in the graph given the branch's root node. It attaches the given branchId to all nodes and edges.

Parameters

branchRootNode

Node<{ branchId?: string; isGrayed?: boolean; }>

Root node of the branch.

branchId

string

Unique branchId for the branch.

currentNodes

Node<{ branchId?: string; isGrayed?: boolean; }>[]

Current nodes.

currentEdges

Edge<{ branchId?: string; isGrayed?: boolean; }>[]

Current edges.

Returns

OnGrayedState