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

动态更新画布的配置 #3935

Closed
dujuncheng opened this issue Sep 26, 2023 · 4 comments
Closed

动态更新画布的配置 #3935

dujuncheng opened this issue Sep 26, 2023 · 4 comments
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions

Comments

@dujuncheng
Copy link

功能描述

需求背景:画布的连线模式希望由用户配置,在画布渲染之后,可以支持切换为 'manhattan' 或者 'normal' 的路由。

目前看文档,x6 router 只支持在初始化 new Graph 时配置,不支持动态设置

期望解决方案

期望提供 graph.setRouter 的 api

@NewByVector
Copy link
Contributor

暂时没有全局更新的方法,不过可以支持通过 edge 来单独更新。

// http://x6.antv.antgroup.com/api/model/edge#setrouter
edge.setRouter(xx)

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label Sep 26, 2023
@dujuncheng
Copy link
Author

暂时没有全局更新的方法,不过可以支持通过 edge 来单独更新。

// http://x6.antv.antgroup.com/api/model/edge#setrouter
edge.setRouter(xx)

嗯嗯,看到文档了。edge.setRouter(xx) 只能修改“已渲染” edge 的路由。没办法实现,“新拽出来线”是新设置的路由

@NewByVector
Copy link
Contributor

新拖出来的线可以在 createEdge 配置中重新配置路由。

@x6-bot
Copy link
Contributor

x6-bot bot commented Oct 2, 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 Oct 2, 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