Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(webv2): raise the selected node above others in the graph preview

Josh Corbett66154cfb692a
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewFlow.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewFlow.tsx
index d8ad44ab1b..54eb0880c7 100644
--- a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewFlow.tsx
+++ b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewFlow.tsx
@@ -122,6 +122,8 @@ const toPreviewNodes = (
id: node.id,
position: positionHints?.[node.id] ?? positions[node.id] ?? { x: 0, y: 0 },
type: 'preview' as const,
+ // Selection here is preview data, not xyflow's, so raise the selected node above overlapping neighbours manually.
+ ...(node.id === selectedNodeId ? { zIndex: 1 } : {}),
}));
};