-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
如何阻止节点拖入combo? #5106
Comments
hi @toddmark, welcome! |
https://g6.antv.antgroup.com/manual/middle/states/default-behavior#drag-node 这里面有个onlyChangeComboSize可以配置不将节点从 Combo 中拖出或将节点拖入到 Combo 中,设置为true就行。 |
楼上的方法是对的~,另外 drag-node 的 shouldEnd 和 shouldBegin 也可以尝试一下 |
@xiaoSS-developer onlyChangeComboSize 这个属性是有效的。不过没有完全解决我的问题。我在拖某类节点A时,需要禁止拖入Combo的行为,但我在拖某类节点B时,需要允许拖入Combo的行为。 由此,如果使用onlyChangeComboSize直接禁用。不满足我拖动B类节点行为。这就带来一个新的问题:需要动态修改 drag-node的配置,可惜,我在setMode中没有找到相关方案。请问如何动态修改 setMode 的配置呢? 比如: setMode("drag-node", {test: true}} |
问题描述
在我的场景中,有些节点不允许被拖入combo中,请问该如何使用相关API?
重现链接
https://stackblitz.com/
重现步骤
在我的场景中,有些节点不允许被拖入combo中,请问该如何使用相关API?
预期行为
期望能够控制节点能否被拖入combo中的行为。
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: