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 工具调整的anchor无法通过setTarget更新 #3914

Closed
dlspacezero opened this issue Sep 15, 2023 · 2 comments
Closed

通过segments 工具调整的anchor无法通过setTarget更新 #3914

dlspacezero opened this issue Sep 15, 2023 · 2 comments

Comments

@dlspacezero
Copy link

问题描述

需要把节点的位置和边的连接点位置保存到服务端上,然后根据服务端的数据重新更新节点和边。
问题:
1、因为节点的位置固定了,设置了connecting/router为 'orth',边会根据内置算法,自动找和节点的连接点,但是线同target或者同source的线会重合到一起,所以加了source-arrowhead,target-arrowhead工具,和节点上下左右四个正中的port,可以手动调节边的连接点
2、调整了边与节点的连接点后,边与节点的边会重合,类似:https://github.com/antvis/X6/issues/3538
3、为了解决这个问题,加了segments和vertices调整边的路径,调整好了把target的数据(包含anchor)保存到服务端后,刷新页面通过setTarget来更新边的数据,发现边并没有根据anchor来绘制边的路径。类似:https://github.com/antvis/X6/issues/1949

重现链接

暂无

重现步骤

如上

预期行为

边的路径能够按照服务端保存的anchor进行绘制,或者提供另外一种能够让节点的边框不与边的路径重合且根据服务端数据能够重新渲染的办法。

平台

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

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@dlspacezero
Copy link
Author

问题已解决:
segments工具调整的边,可以获取到边的路径点,通过保存和重新设置路径点解决

@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 19, 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 Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant