Skip to content

Commit 67ef2b2

Browse files
committed
improvement(canvas): enable middle mouse button panning in cursor mode
1 parent 75832ca commit 67ef2b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-shift-selection-lock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface UseShiftSelectionLockResult {
1212
/** Computed ReactFlow props based on current selection state */
1313
selectionProps: {
1414
selectionOnDrag: boolean
15-
panOnDrag: [number, number] | false
15+
panOnDrag: number[]
1616
selectionKeyCode: string | null
1717
}
1818
}
@@ -55,7 +55,7 @@ export function useShiftSelectionLock({
5555

5656
const selectionProps = {
5757
selectionOnDrag: !isHandMode || isShiftSelecting,
58-
panOnDrag: (isHandMode && !isShiftSelecting ? [0, 1] : false) as [number, number] | false,
58+
panOnDrag: isHandMode && !isShiftSelecting ? [0, 1] : [1],
5959
selectionKeyCode: isShiftSelecting ? null : 'Shift',
6060
}
6161

0 commit comments

Comments
 (0)