Skip to content

Commit d5285f8

Browse files
committed
fix(workflow): elevate the connection preview edge with the rest
It renders highlighted — its data carries `isConnectedToSelection` — but it was the one call site left taking a depth tier, so the line being drawn could be crossed by an ordinary edge in a deeper container. Highlighted now means elevated with no exception. Also drop the export on the highlighted tier: nothing outside the module reads it, and the band's tiers are an implementation detail of `getEdgeZIndex`.
1 parent 4f55c08 commit d5285f8

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4529,7 +4529,12 @@ const WorkflowContent = React.memo(
45294529
target: CONNECTION_BLOCK_SELECTOR_NODE_ID,
45304530
targetHandle: 'target',
45314531
type: 'workflowEdge',
4532-
zIndex: getEdgeZIndex(sourceParentNode ? (sourceParentNode.zIndex ?? 0) : undefined),
4532+
/* Rendered highlighted (`isConnectedToSelection` below), so it is
4533+
elevated like any other highlighted edge — the preview line is the
4534+
one the user is currently drawing. */
4535+
zIndex: getEdgeZIndex(sourceParentNode ? (sourceParentNode.zIndex ?? 0) : undefined, {
4536+
isHighlighted: true,
4537+
}),
45334538
focusable: false,
45344539
deletable: false,
45354540
reconnectable: false,

packages/workflow-renderer/src/canvas-layers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const EDGE_Z_DEPTH_MAX = 18
3737
* own endpoints; a line belongs behind cards, knobs and the action-bar swell
3838
* whether or not it is highlighted.
3939
*/
40-
export const EDGE_Z_HIGHLIGHTED = 19
40+
const EDGE_Z_HIGHLIGHTED = 19
4141
export const EDGE_Z_MAX = 20
4242
export const BLOCK_Z_BASE = 21
4343
export const CONTAINER_CHILD_Z_BASE = 1000

0 commit comments

Comments
 (0)