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

大神们,请问边上工具 segments 单独使用不起作用,一定要和 vertices 配合 才起作用是为什么? #3568

Closed
yangchuanmeng opened this issue May 8, 2023 · 4 comments
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions

Comments

@yangchuanmeng
Copy link

问题描述

边上工具 segments 单独使用时不起作用,一定要和 vertices 配合才起作用是为什么?

重现链接

CodeSandbox

重现步骤

在使用的时候单独添加cell.addTools([
{
name: "segments",
args: {
snapRadius: 20,
attrs: {
fill: "#444",
},
stopPropagation: false,
},
},
]);
页面没用任何工具显示,一定要再添加上vertices,页面才会显示”点 和 长条“的工具来操作连接线:
cell.addTools([
{
name: "segments",
args: {
snapRadius: 20,
attrs: {
fill: "#444",
},
stopPropagation: false,
},
},
{
name: "vertices",
args: {
snapRadius: 20,
attrs: {
fill: "#444",
},
stopPropagation: false,
},
},
]);
有没有办法,只使用segments工具呢?

预期行为

1

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • X6 版本: [1.28.2 ... ]
    1

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented May 8, 2023

👋 @yangchuanmeng

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.

@yangchuanmeng
Copy link
Author

好的,感谢

@NewByVector
Copy link
Contributor

segments 默认只有在连线水平或者垂直的场景下才会出现,可以参考 precision 配置。

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label May 8, 2023
@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 6, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Jul 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions
Projects
None yet
Development

No branches or pull requests

2 participants