From 67ef2b25e6918c1d3ced021f6d9a02abc6966590 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 12 Mar 2026 12:34:31 -0700 Subject: [PATCH] improvement(canvas): enable middle mouse button panning in cursor mode --- .../w/[workflowId]/hooks/use-shift-selection-lock.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-shift-selection-lock.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-shift-selection-lock.ts index d50ec825514..9a953cbede7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-shift-selection-lock.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-shift-selection-lock.ts @@ -12,7 +12,7 @@ interface UseShiftSelectionLockResult { /** Computed ReactFlow props based on current selection state */ selectionProps: { selectionOnDrag: boolean - panOnDrag: [number, number] | false + panOnDrag: number[] selectionKeyCode: string | null } } @@ -55,7 +55,7 @@ export function useShiftSelectionLock({ const selectionProps = { selectionOnDrag: !isHandMode || isShiftSelecting, - panOnDrag: (isHandMode && !isShiftSelecting ? [0, 1] : false) as [number, number] | false, + panOnDrag: isHandMode && !isShiftSelecting ? [0, 1] : [1], selectionKeyCode: isShiftSelecting ? null : 'Shift', }