File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId] Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export function PaneContextMenu({
2323 onPaste,
2424 onAddBlock,
2525 onAutoLayout,
26+ onFitToView,
2627 onOpenLogs,
2728 onToggleVariables,
2829 onToggleChat,
@@ -115,6 +116,14 @@ export function PaneContextMenu({
115116 < span > Auto-layout</ span >
116117 < span className = 'ml-auto opacity-70 group-hover:opacity-100' > ⇧L</ span >
117118 </ PopoverItem >
119+ < PopoverItem
120+ onClick = { ( ) => {
121+ onFitToView ( )
122+ onClose ( )
123+ } }
124+ >
125+ Fit to View
126+ </ PopoverItem >
118127
119128 { /* View actions */ }
120129 < PopoverDivider />
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ export interface PaneContextMenuProps {
7676 onPaste : ( ) => void
7777 onAddBlock : ( ) => void
7878 onAutoLayout : ( ) => void
79+ onFitToView : ( ) => void
7980 onOpenLogs : ( ) => void
8081 onToggleVariables : ( ) => void
8182 onToggleChat : ( ) => void
Original file line number Diff line number Diff line change @@ -3347,6 +3347,7 @@ const WorkflowContent = React.memo(() => {
33473347 onPaste = { handleContextPaste }
33483348 onAddBlock = { handleContextAddBlock }
33493349 onAutoLayout = { handleAutoLayout }
3350+ onFitToView = { ( ) => fitViewToBounds ( { padding : 0.1 , duration : 300 } ) }
33503351 onOpenLogs = { handleContextOpenLogs }
33513352 onToggleVariables = { handleContextToggleVariables }
33523353 onToggleChat = { handleContextToggleChat }
You can’t perform that action at this time.
0 commit comments