From a5d0e686751304e52a627ec8e3ee3daa587d0df5 Mon Sep 17 00:00:00 2001 From: yangzheli <43645580+yangzheli@users.noreply.github.com> Date: Thu, 20 Nov 2025 11:27:30 +0800 Subject: [PATCH] feat(workflow): optimize workflow canvas pan and scroll behavior (#28250) Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> --- web/app/components/workflow/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx index 86c6bf153e..4fc9c48caa 100644 --- a/web/app/components/workflow/index.tsx +++ b/web/app/components/workflow/index.tsx @@ -409,8 +409,8 @@ export const Workflow: FC = 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}