X6
X6 copied to clipboard
edgeLabelMovable置为true,如何限制edge label的拖拽范围?
问题描述
1.初始化new Graph { ... interacting: { edgeLabelMovable: true, } } 2.创建带有标签的edge; 3.拖拽标签,标签可以拖拽至画布任何位置。
重现链接
无
重现步骤
无
预期行为
期望label只在edge的长度范围移动,且无偏移。
平台
- 操作系统: [Linux]
- 网页浏览器: [Google Chrome]
- X6 版本: [1.30.1 ]
屏幕截图或视频(可选)
补充说明(可选)
No response
👋 @binwang-ln
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.
这个功能暂时是不支持的。
这个功能暂时是不支持的。
2.x上,会有吗
@zzjjbbaa 在开发计划中。
@zzjjbbaa 在开发计划中。
hi,想问下这个feature有进展嘛
期待这个功能
@zzjjbbaa 在开发计划中。
可以通过edge:lables事件,将偏移的值该为0即可: this.graph.on('edge:change:labels', ({ cell, edge, current,previous }) => { current.forEach(function(value, index) { value.position.offset = 0 }); })