Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Elscrux authored and schweikart committed Mar 28, 2024
1 parent 382fded commit 766cec1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/solvers/Graph/ProblemGraphView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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",
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit 766cec1

Please sign in to comment.