File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId] Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,7 @@ const reactFlowStyles = [
207207 '[&_.react-flow__node-subflowNode.selected]:!shadow-none' ,
208208] . join ( ' ' )
209209const reactFlowFitViewOptions = { padding : 0.6 , maxZoom : 1.0 } as const
210+ const embeddedFitViewOptions = { padding : 0.15 , maxZoom : 0.85 , minZoom : 0.35 } as const
210211const reactFlowProOptions = { hideAttribution : true } as const
211212
212213/**
@@ -3851,11 +3852,11 @@ const WorkflowContent = React.memo(
38513852 onDragOver = { effectivePermissions . canEdit ? onDragOver : undefined }
38523853 onInit = { ( instance ) => {
38533854 requestAnimationFrame ( ( ) => {
3854- instance . fitView ( reactFlowFitViewOptions )
3855+ instance . fitView ( embedded ? embeddedFitViewOptions : reactFlowFitViewOptions )
38553856 setIsCanvasReady ( true )
38563857 } )
38573858 } }
3858- fitViewOptions = { reactFlowFitViewOptions }
3859+ fitViewOptions = { embedded ? embeddedFitViewOptions : reactFlowFitViewOptions }
38593860 minZoom = { 0.1 }
38603861 maxZoom = { 1.3 }
38613862 panOnScroll
You can’t perform that action at this time.
0 commit comments