Skip to content

Conversation

@kamleshyadav9929
Copy link

Description

Fixes #22 - Transitions overlapping in the workflow graph.

Problem

When multiple transitions originate from the same state, they visually overlap making the graph hard to read.

Solution

Modified CustomEdge.tsx to:

  1. Detect edges sharing the same source node (sibling edges)
  2. Calculate index-based curve offsets to spread edges apart
  3. Apply different curvature to each edge based on its position

Technical Changes

  • Added edgeIndex and totalSiblingEdges detection in the store selector
  • Implemented curvatureOffset calculation based on edge index
  • Switched from getSmoothStepPath to getBezierPath for smoother curves
  • Applied index-based offset when multiple edges share the same source

Files Changed

  • src/components/Graph/Edges/CustomEdge.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transitions overlapping

1 participant