antvis / antvis/G6

[Bug]: mindmap树形布局,节点收起后,占用的空间没有被收回,整体布局未做重新排布

Open
#7,577 8 comments 0 reactions 0 assignees View on GitHub
bug 🐛 need improvement
Dominant language
TypeScript
Stars
12.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug / 问题描述

if (btn && !Reflect.has(btn, '__bind__')) {
Reflect.set(btn, '__bind__', true);
btn.addEventListener(CommonEvent.CLICK, async (e: any) => {
e.stopPropagation();
const { collapsed } = this.attributes;
const graph = this.context.graph;
if (collapsed) graph.expandElement(this.id, { animation: true, align: true });
else graph.collapseElement(this.id, { animation: true, align: true });
});
}

Image

### Reproduction link / 复现链接

_No response_

### Steps to Reproduce the Bug or Issue / 重现步骤

_No response_

### Version / 版本

Please select / 请选择

### OS / 操作系统

- [ ] macOS
- [ ] Windows
- [ ] Linux
- [ ] Others / 其他

### Browser / 浏览器

- [ ] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the mindmap tree-layout behavior around the shown collapseElement and expandElement calls, using the attached image as the expected symptom. Reproduce a node collapse and verify that the surrounding layout recomputes and releases the space previously occupied by the collapsed subtree.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
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.