Skip to content

[Bug]: 缩进树展示异常 #7380

@galfordliu

Description

@galfordliu

Describe the bug / 问题描述

  1. 缩进树初始化后,由于节点多,树本身不会把根节点展示在左上角,而是整个树的中间区域,导致看到的是无效信息
Image

可以通过translateTo去定位根节点到左上角,但这样用起来不友好,还会多一段画面变化。希望可以有配置,初始化时能决定根节点的位置

  1. 树中某个节点,收缩之后,会留白很大一部分空间,不会重新利用这段空间。希望能自动重新计算一下部局。目前也没有办法监听到collapse和expand事件,让我自己来调用layout()。
    展开的图:
Image 收缩了一个节点的图 Image
  1. 如果我把一些节点在初始化时collapsed设置为true,当我在画布点击这个节点展开时,子节点的位置会错乱。看起来位置是在第一次初始化时就计算好了,
Image
  1. await this.graph.render(); 永远不会返回。后面的代码无法执行。看源代码render()声明是async的但是最终不会返回一个promise

Reproduction link / 复现链接

No response

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

No response

Version / 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    question 💬This issue is just a question. It will be converted into discussion automatically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions