From 766cec16dcbbeb1f54e141e426234be9b96c5020 Mon Sep 17 00:00:00 2001 From: nickp Date: Tue, 6 Feb 2024 14:20:15 +0100 Subject: [PATCH] Add some comments --- src/components/solvers/Graph/ProblemGraphView.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/solvers/Graph/ProblemGraphView.tsx b/src/components/solvers/Graph/ProblemGraphView.tsx index 9212301..89f1a1c 100644 --- a/src/components/solvers/Graph/ProblemGraphView.tsx +++ b/src/components/solvers/Graph/ProblemGraphView.tsx @@ -70,6 +70,8 @@ export const ProblemGraphView = (props: { graph: ProblemGraph | null }) => { y: getPositionY(level), }; let data = { label: label }; + + // Add input/output connect points for edges let type: string; if (level == 0) { type = "input"; @@ -86,6 +88,7 @@ export const ProblemGraphView = (props: { graph: ProblemGraph | null }) => { type: type, }; + // Load decision nodes when user action is required if (problemNode.status == SolutionStatus.PENDING_USER_ACTION) { node.style = { background: "teal", @@ -129,6 +132,7 @@ export const ProblemGraphView = (props: { graph: ProblemGraph | null }) => { nodes.push(node); + // Add edge per sub-routine and recursively add sub-routines for (let i = 0; i < problemNode.subRoutines.length; i++) { const subRoutine = problemNode.subRoutines[i]; edges.push({