antvis/G6

使用addItem添加节点的时候,添加的节点位置错乱 #4726

daisy0123 posted onGitHub

Describe the bug

当前使用的布局是 type: "dagre", rankdir: "LR", align: "UL", controlPoints: true, nodesep: 10, ranksep: 50, 当使用addItem 添加节点后,节点不是根据新增节点的source起点绘制,而是在容器的开头绘制了。 image

demo地址:https://codesandbox.io/s/keen-wilbur-h96u4n?file=/index.js 麻烦帮忙看看,这个之前有g6的同事帮忙解决了,目前4.6.18版本是没有问题的,但是新版本有问题,应该是4.6.18版本的代码没有更新到最新版本

Your Example Website or App

Steps to Reproduce the Bug or Issue

如上

Expected behavior

希望不要错乱,希望是如图下: image

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response


addItem 完后,调用重新布局 graph.layout

posted by Yanyan-Wang almost 2 years ago

addItem 完后,调用重新布局 graph.layout

image 有调用重新布局 graph.layout,demo地址:https://codesandbox.io/s/keen-wilbur-h96u4n?file=/index.js

posted by daisy0123 almost 2 years ago

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] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests