antvis/G6

Force layouts don't seem to work when using ComboCombined #4400

ephraimrothschild posted onGitHub

Describe the bug

I am trying to display a graph that, on page load, only shows combos (by default, all combos are collapsed). Upon expanding the combos (some of them nested several layers deep), it should display the nodes and their edges.

However on page load the goal is to only show collapsed combos, and have it act similarly to the Christmas Bubbles Example. After several days of trying to debug why I couldn't seem to get this working, I discovered that it appears that when using ComboCombined or ComboForce as the layout, none of the force directed layouts work properly on the combos or nodes displayed. Even when preventOverlap is enabled, none of the nodes or combos seem to have an effect on pushing the others around it.

As an example, I took the Christmas Bubbles examples given in the documentation, and modified it so that it uses the comboCombined layout, and placed its force layout into the outerLayout configuration (I also added the drag-node mode to make dragging work). With only that change, the "force" part of the force layout no longer seems to have an effect, and nodes are neither drawn closer to each other, nor pushed away when dragging one node on top of another.

Your Example Website or App

https://codesandbox.io/s/cool-worker-y9mmtg

Steps to Reproduce the Bug or Issue

As above

Expected behavior

When dragging nodes or combos that have an outerLayout of force, it should act the same as the ChristmasBubbles example, and push other nodes/combos away when dragging one node/combo over another.

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


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