Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问节点做了自定义拖拽功能的情况下如何和画布的拖拽平移功能共存? #4473

Open
cha-mi opened this issue Oct 22, 2024 · 4 comments

Comments

@cha-mi
Copy link

cha-mi commented Oct 22, 2024

问题描述

请问节点做了自定义拖拽功能的情况下如何和画布的拖拽平移功能共存,希望可以提供一下思路

重现链接

https://codesandbox.io/p/sandbox/daraggable-forked-jhxch5

重现步骤

拖拽节点画布会和节点一起平移了

预期行为

希望是拖拽节点的时候可以画布静止,不和节点拖拽行为冲突,应该如何去实现

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.11.1 ...]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Oct 22, 2024

👋 @cha-mi

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@Yeti-xxx
Copy link

尝试为画布拖拽添加修饰键呢?
image

@cha-mi
Copy link
Author

cha-mi commented Oct 28, 2024

尝试为画布拖拽添加修饰键呢? image
还是会有问题:这么做的话拖拽完节点要再拖拽画布还得点几次画布才能正常拖拽,不知为何......

@Yeti-xxx
Copy link

尝试为画布拖拽添加修饰键呢? image
还是会有问题:这么做的话拖拽完节点要再拖拽画布还得点几次画布才能正常拖拽,不知为何......

我看了下确实还需要点击几次,我觉得可能是元素自定义的拖拽事件和画布更新的时机不同或者冲突导致的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@cha-mi @Yeti-xxx and others