dify icon indicating copy to clipboard operation
dify copied to clipboard

Feature Request: Enable two-finger swipe in Workflow Editor (`panOnScroll=true` for ReactFlow)

Open SuCicada opened this issue 11 months ago • 0 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I’d like to suggest enabling panOnScroll=true in the ReactFlow component of the workflow editor. This would improve the experience, particularly for Mac trackpad users.

Benefit: better usability Right now, Mac trackpad users can’t pan the canvas with two-finger scrolling. Instead, they have to click and drag on empty space, which is inconvenient and slows down workflow navigation.

Enabling panOnScroll=true would let users pan naturally with a two-finger swipe, making movement smoother and more intuitive.

for example:

<ReactFlow panOnScroll={true} panOnScrollSpeed={1} />

Adding this would make workflow navigation significantly easier for trackpad users, while keeping the existing experience intact for mouse users.

2. Additional context or comments

Many tools, like Figma, already support two-finger scrolling for panning. This would bring ReactFlow’s user experience in line with industry standards.

or you can add as a Configurable Option: Some users may prefer the current behavior, so it makes sense to provide a toggle. https://www.coze.com has a similar implementation.**

Image

3. Can you help us with this feature?

  • [x] I am interested in contributing to this feature.

SuCicada avatar Mar 12 '25 08:03 SuCicada