antvis/G6

Have an edge point to the centre of another edge #2938

andreasnett posted onGitHub

<!-- ⚠️ ⚠️ ⚠️ 注意:请使用下面的链接来新建 issue: ⚠️ ⚠️ ⚠️ https://antv-issue-helper.surge.sh 不是用上面的链接创建的 issue 会被立即关闭。 -->

<!-- ⚠️ ⚠️ ⚠️ IMPORTANT: Please use the following link to create a new issue: ⚠️ ⚠️ ⚠️ https://antv-issue-helper.surge.sh If your issue was not created by using the link above, it will be closed immediately. -->

I assume this can be done by calling graph.updateItem and set the target to an {x, y} that is the center of the edge. The center of the edge can be calculated by having access to the target edge, which can be done at click events. However, I am not sure where I should do this to have access to both the graph, to call updateItem, as well as the target edge. When the edge is clicked, a event is fired in my app that adds this relation to the redux store. I think it should be done with afterDraw, but here I can't access graph.updateItem


This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help. 这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests