Skip to content

Commit

Permalink
fix(ui): store hidden state of edges in workflows
Browse files Browse the repository at this point in the history
This prevents a minor visual bug where collapsed edges between collapsed nodes didn't display correctly on first load of a workflow.
  • Loading branch information
psychedelicious committed May 20, 2024
1 parent 42e3218 commit d14f37b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions invokeai/frontend/web/src/features/nodes/types/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const zWorkflowEdgeDefault = zWorkflowEdgeBase.extend({
type: z.literal('default'),
sourceHandle: z.string().trim().min(1),
targetHandle: z.string().trim().min(1),
hidden: z.boolean().optional(),
});
const zWorkflowEdgeCollapsed = zWorkflowEdgeBase.extend({
type: z.literal('collapsed'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const buildWorkflowFast: BuildWorkflowFunction = ({ nodes, edges, workflo
target: edge.target,
sourceHandle: edge.sourceHandle,
targetHandle: edge.targetHandle,
hidden: edge.hidden,
});
} else if (edge.type === 'collapsed') {
newWorkflow.edges.push({
Expand Down

0 comments on commit d14f37b

Please sign in to comment.