antvis / antvis/Graphin

Graphin style InnerLayout of ComboCombined layout breaks

Open
#372 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.1k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

When defining the innerLayout config of ComboCombined layout in graphin way, e.g.
```js
const layoutWrong = {
type: "comboCombined",
innerLayout: {
type: "dagre"
}
};
```
It will result in a `TypeError innerGraphLayout.layout is not a function`.
Changing it to using G6 way of defining layout solve the issue:
```js
const layoutCorrect = {
type: "comboCombined",
innerLayout: new G6.Layout["dagre"]()
};
```

### Your Example Website or App

https://codesandbox.io/s/hardcore-bell-fbebob?file=/App.tsx:1993-2084

### Steps to Reproduce the Bug or Issue

1. Run the demo, and see the error
2. Modify the `layout={layoutWrong}` to `layout={layoutCorrect}`, you will see it works

### Expected behavior

I would expect the innerLayout also can be defined in the Graphin way.

### Screenshots or Videos

_No response_

### Platform

- OS: Windows
- Browser: Chrome
- Version: 2.5.2

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.