X6
X6 copied to clipboard
连接线为什么会拐这么大一圈?节点间距应该怎么控制呢?
问题描述
连接线拐的太大了,应该怎么设置节点的间距呢
重现链接
暂无
重现步骤
设置连接线rounded属性,节点间距只要小店就会出现拐弯的情况。
预期行为
我希望连接线不会因为节点间距太小而导致连接线的问题
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox ...]
- X6 版本: [2.11.1 ...]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
👋 @cangsnage
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.
router: { name: 'manhattan', args: { padding: 5, }, },
连线路由的padding改小点试试呢 默认是20
router: {
name: 'manhattan',
args: {
padding: 5,},
},
连线路由的padding改小点试试呢 默认是20
不行,现在想着改变节点的间距但是好像没有间距最小的距离的api
我同样遇到了这个问题,一番查阅无果后,我的方案是手动将边的 router 设置为 normal,当然也可以自动设置但是这样会比较复杂,根据自己的业务需求和开发工作量来决定吧。
setRouter('normal')
间距最小的api 这个咋理解,这样是不是拖动后 两个节点在一起 自己会分开?
可以通过以下配置自定义回退路由,大部分情况下使用 er 会比默认的 orth 效果要好一些
import { Registry } from '@antv/x6'
router: {
name: 'manhattan',
args: {
fallbackRouter: Registry.Router.presets.er,
},
},