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

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

Open
binwang-ln opened this issue Nov 15, 2022 · 7 comments
Open
Labels
type: feature 新功能 Feature/enhancement requests

Comments

@binwang-ln
Copy link

问题描述

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

@x6-bot
Copy link
Contributor

x6-bot bot commented Nov 15, 2022

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

@NewByVector
Copy link
Contributor

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

@NewByVector NewByVector added the type: feature 新功能 Feature/enhancement requests label Jan 28, 2023
@zzjjbbaa
Copy link

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

2.x上,会有吗

@NewByVector
Copy link
Contributor

@zzjjbbaa 在开发计划中。

@hnustwjj
Copy link

@zzjjbbaa 在开发计划中。

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

@wenhaoxu1
Copy link

期待这个功能

@zzjjbbaa 在开发计划中。

@cluck0428
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature 新功能 Feature/enhancement requests
Projects
None yet
Development

No branches or pull requests

6 participants