antvis / XFlow

React component for building interactive diagrams.
https://x6.antv.antgroup.com/xflow/guide/introduction
MIT License
584 stars 239 forks source link

fix(flow-chart): fix cannot copy/paste edges within group #355

Closed lijinke666 closed 1 year ago

lijinke666 commented 1 year ago

Description

修复开启群组后, 无法复制/粘贴群组里面的连接线, 目前发现有三个问题

复现地址: https://xflow.antv.vision/docs/tutorial/solutions/flow

image

不知道是我理解有误, 还是 XFlow 依赖的 X6 对应版本有 bug, 所以修改为 getSelectedCells + getEdges 组合的方式 (我看 parseCells 已经有相应 edges 过滤的处理) 保证复制到正确的东西

image

image

image

能力有限, 只能定位到这里的, 不确定这样修改会不会碰伤其他逻辑, 也没看到有任何的单测, 如果这个库还要维护的话, 请大佬 review 一下, 或者给出更好的解决方式

修复前 修复后
Kapture 2023-02-23 at 15 18 54 Kapture 2023-02-23 at 15 17 39

Motivation and Context

Types of changes

Self Check before Merge

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 084e84bd82339cb1cdce6983f2062cecaf913114

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

xflow-bot[bot] commented 1 year ago

👋 @lijinke666

💖 Thanks for opening this pull request! 💖

Please follow the contributing guidelines. And we use semantic commit messages to streamline the release process.

Examples of commit messages with semantic prefixes:

Things that will help get your PR across the finish line:

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

xflow-bot[bot] commented 1 year ago

👋 @lijinke666

Congrats on merging your first pull request! 🎉🎉🎉