Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis committed Oct 1, 2024
1 parent 88b0316 commit c77883d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
@append-output="(event: any) => appendOutput(currentActiveNode, event)"
@close="addOperatorToRoute(null)"
@select-output="(event: any) => selectOutput(currentActiveNode, event)"
@update-output="(event: any) => updateOutput(currentActiveNode, event)"
@update-output-port="(event: any) => updateOutputPort(currentActiveNode, event)"
@update-state="(event: any) => updateWorkflowNodeState(currentActiveNode, event)"
@update-status="(status: OperatorStatus) => updateWorkflowNodeStatus(currentActiveNode, status)"
/>
Expand Down Expand Up @@ -409,9 +409,9 @@ function selectOutput(node: WorkflowNode<any> | null, selectedOutputId: string)
saveWorkflowHandler();
}
function updateOutput(node: WorkflowNode<any> | null, workflowOutput: WorkflowOutput<any>) {
function updateOutputPort(node: WorkflowNode<any> | null, workflowOutput: WorkflowOutput<any>) {
if (!node) return;
workflowService.updateOutput(node, workflowOutput);
workflowService.updateOutputPort(node, workflowOutput);
saveWorkflowHandler();
}
Expand Down
9 changes: 4 additions & 5 deletions packages/client/hmi-client/src/services/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,10 @@ export function getActiveOutput(node: WorkflowNode<any>) {
return node.outputs.find((o) => o.id === node.active);
}

/** Update the output of the operator */
export function updateOutput(node: WorkflowNode<any>, updatedOutput: WorkflowOutput<any>) {
let output = node.outputs.find((o) => o.id === updatedOutput.id);
if (!output) return;
output = Object.assign(output, updatedOutput);
export function updateOutputPort(node: WorkflowNode<any>, updatedOutputPort: WorkflowOutput<any>) {
let outputPort = node.outputs.find((port) => port.id === updatedOutputPort.id);
if (!outputPort) return;
outputPort = Object.assign(outputPort, updatedOutputPort);
}

// Check if the current-state matches that of the output-state.
Expand Down

0 comments on commit c77883d

Please sign in to comment.