Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] 使用分组嵌套时的两个bug #1007

Closed
ChangeSuger opened this issue Feb 7, 2023 · 1 comment
Closed

[Bug report] 使用分组嵌套时的两个bug #1007

ChangeSuger opened this issue Feb 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ChangeSuger
Copy link
Collaborator

问题描述
在使用分组嵌套(即分组中包含子分组)时:

  • 如果分组的 children 包含子分组与子分组中所有节点时,折叠展开正常,但拖拽时,子分组中节点的移动距离异常
    bug_img1
  • 如果分组的 children 仅包含子分组而不包含子分组中节点时,拖拽正常,但折叠时,子分组中的节点不会被折叠
    bug_img1

最简复现demo

这边直接搬了分组文档的用例,将数据渲染部分替换为以下代码即可:

lf.render({
  nodes: [
    {
      type: "my-group",
      x: 400,
      y: 400,
      children: ["rect_2"]
    },
    {
      id: "rect_2",
      type: "circle",
      x: 400,
      y: 400
    },
    {
      id: "rect_3",
      type: "rect",
      x: 200,
      y: 100
    },
    {
      id: "rect_4",
      type: "rect",
      x: 400,
      y: 100
    },
    {
      id: "rect_5",
      type: "rect",
      x: 200,
      y: -100
    },
    {
      id: "rect_6",
      type: "rect",
      x: 0,
      y: -100
    },
    {
      id: "group_2",
      type: "sub-process",
      x: 250,
      y: 120,
      children: ["rect_3", "rect_4"]
    },
    {
      id: "group_3",
      type: "sub-process",
      x: 300,
      y: 20,
      children: ["rect_5", "group_2", "rect_3", "rect_4"] // 包含子分组与子分组中所有节点时,折叠展开正常,但拖拽时,子分组中节点的移动距离异常
      // children: ["rect_5", "group_2"] // 仅包含子分组而不包含子分组中节点时,拖拽正常,但折叠时,子分组中的节点不会被折叠
    }
  ]
});
@towersxu
Copy link
Collaborator

感谢提出,目前分组嵌套确实存在问题,预计本周会解决。

@towersxu towersxu added the bug Something isn't working label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants