X6 icon indicating copy to clipboard operation
X6 copied to clipboard

edgeLabelMovable置为true,如何限制edge label的拖拽范围?

Open binwang-ln opened this issue 2 years ago • 7 comments

问题描述

1.初始化new Graph { ... interacting: { edgeLabelMovable: true, } } 2.创建带有标签的edge; 3.拖拽标签,标签可以拖拽至画布任何位置。

重现链接

重现步骤

预期行为

期望label只在edge的长度范围移动,且无偏移。

平台

  • 操作系统: [Linux]
  • 网页浏览器: [Google Chrome]
  • X6 版本: [1.30.1 ]

屏幕截图或视频(可选)

截屏2022-11-15 17 23 53

补充说明(可选)

No response

binwang-ln avatar Nov 15 '22 09:11 binwang-ln

👋 @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.

x6-bot[bot] avatar Nov 15 '22 09:11 x6-bot[bot]

这个功能暂时是不支持的。

NewByVector avatar Jan 28 '23 02:01 NewByVector

这个功能暂时是不支持的。

2.x上,会有吗

zzjjbbaa avatar Jul 19 '23 07:07 zzjjbbaa

@zzjjbbaa 在开发计划中。

NewByVector avatar Jul 25 '23 14:07 NewByVector

@zzjjbbaa 在开发计划中。

hi,想问下这个feature有进展嘛

hnustwjj avatar Nov 14 '23 09:11 hnustwjj

期待这个功能

@zzjjbbaa 在开发计划中。

wenhaoxu1 avatar Jan 11 '24 07:01 wenhaoxu1

可以通过edge:lables事件,将偏移的值该为0即可: this.graph.on('edge:change:labels', ({ cell, edge, current,previous }) => { current.forEach(function(value, index) { value.position.offset = 0 }); })

cluck0428 avatar May 24 '24 07:05 cluck0428