MCPcopy Create free account
hub / github.com/WardAnalytics/WardGraph / setEdgeState

Function setEdgeState

src/components/graph/Graph.tsx:609–622  ·  view source on GitHub ↗
(edgeID: string, state: TransfershipEdgeStates)

Source from the content-addressed store, hash-verified

607 // Edge State Toggling ------------------------------------------------------
608
609 function setEdgeState(edgeID: string, state: TransfershipEdgeStates) {
610 const edge = edgesRecord[edgeID];
611 if (edge) {
612 const newEdge: Edge = {
613 ...edge,
614 data: { ...edge.data, state },
615 };
616 setEdges((edges) => {
617 const newEdges = edges.filter((edge) => edge.id !== edgeID);
618 newEdges.push(newEdge);
619 return newEdges;
620 });
621 }
622 }
623
624 // Edge inspection -----------------------------------------------------------
625

Callers 1

TransfershipEdgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected