File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 ChevronDown ,
99 Copy ,
1010 History ,
11+ Layers ,
1112 Loader2 ,
1213 Play ,
1314 SkipForward ,
@@ -698,6 +699,37 @@ export function ControlBar() {
698699 </ Tooltip >
699700 )
700701
702+ /**
703+ * Render auto-layout button
704+ */
705+ const renderAutoLayoutButton = ( ) => {
706+ const handleAutoLayoutClick = ( ) => {
707+ if ( isExecuting || isMultiRunning || isDebugging ) {
708+ return
709+ }
710+
711+ window . dispatchEvent ( new CustomEvent ( 'trigger-auto-layout' ) )
712+ }
713+
714+ return (
715+ < Tooltip >
716+ < TooltipTrigger asChild >
717+ < Button
718+ variant = 'ghost'
719+ size = 'icon'
720+ onClick = { handleAutoLayoutClick }
721+ className = 'hover:text-primary'
722+ disabled = { isExecuting || isMultiRunning || isDebugging }
723+ >
724+ < Layers className = 'h-5 w-5' />
725+ < span className = 'sr-only' > Auto Layout</ span >
726+ </ Button >
727+ </ TooltipTrigger >
728+ < TooltipContent command = 'Shift+L' > Auto Layout</ TooltipContent >
729+ </ Tooltip >
730+ )
731+ }
732+
701733 /**
702734 * Render debug mode controls
703735 */
@@ -975,6 +1007,7 @@ export function ControlBar() {
9751007 { renderHistoryDropdown ( ) }
9761008 { renderNotificationsDropdown ( ) }
9771009 { renderDuplicateButton ( ) }
1010+ { renderAutoLayoutButton ( ) }
9781011 { renderDebugModeToggle ( ) }
9791012 { /* {renderPublishButton()} */ }
9801013 { renderDeployButton ( ) }
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ export const WorkflowEdge = ({
1212 data,
1313 style,
1414} : EdgeProps ) => {
15- const isHorizontal = sourcePosition === 'right' || sourcePosition === 'left'
16-
1715 const [ edgePath , labelX , labelY ] = getSmoothStepPath ( {
1816 sourceX,
1917 sourceY,
@@ -22,7 +20,7 @@ export const WorkflowEdge = ({
2220 targetY,
2321 targetPosition,
2422 borderRadius : 8 ,
25- offset : isHorizontal ? 30 : 20 ,
23+ offset : 10 ,
2624 } )
2725
2826 // Use the directly provided isSelected flag instead of computing it
You can’t perform that action at this time.
0 commit comments