Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat(workflow): optimize workflow canvas pan and scroll behavior (#28250)

yangzhelia5d0e6867513
diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx
index 86c6bf153e7..4fc9c48caaf 100644
--- a/web/app/components/workflow/index.tsx
+++ b/web/app/components/workflow/index.tsx
@@ -409,8 +409,8 @@ export const Workflow: FC<WorkflowProps> = memo(({
nodesConnectable={!nodesReadOnly}
nodesFocusable={!nodesReadOnly}
edgesFocusable={!nodesReadOnly}
- panOnScroll={false}
- panOnDrag={controlMode === ControlMode.Hand}
+ panOnScroll={controlMode === ControlMode.Pointer && !workflowReadOnly}
+ panOnDrag={controlMode === ControlMode.Hand || [1]}
zoomOnPinch={true}
zoomOnScroll={true}
zoomOnDoubleClick={true}