antvis / antvis/X6

做完了分组嵌套之后用布局,会导致嵌套关系丢失

Open
#4,732 2 comments 0 reactions 0 assignees View on GitHub
waiting for maintainer
Dominant language
TypeScript
Stars
6.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

大佬,能不能出一个 做好分组之后,自动布局

_需求_:做好分组之后,自动布局

### 重现链接

暂无

### 重现步骤

现在的情况 我们的创建出的 Node1 和 Node2 做了一个嵌套关系,然后使用布局

因为我们塞入布局的是一个扁平化 Node 数组,没有嵌套关系,所以布局也是一个扁平化的布局

### 预期行为

做好分组之后,自动布局,分组也可以正常

### 平台

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

### 屏幕截图或视频(可选)

或许我们可以参考 G6 文档中 用 combo 作为一个分组,让我们的布局可以识别到嵌套关系,然后做一个分组后的自动布局的效果

Image

### 补充说明(可选)

_No response_

Contributor guide

Open the contributing guide

Research direction

Start from the layout entry point that receives the flattened Node array and review how nested relationships are represented before layout. Compare the requested behavior with the G6 combo documentation referenced in the issue; done means automatic layout preserves the group nesting instead of flattening it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.