antvis / XFlow

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

XFlow l流程解决中的 撤销功能 #197

Closed ayaayaayaai closed 2 years ago

ayaayaayaai commented 2 years ago

问题描述

XFlow 流程解决 菜单栏中的撤销功能不能实现 getGraphHistory() 找不到

重现链接

https://codesandbox.io/s/old-river-cyc9ih?file=/config-toolbar.ts:2695-2710

重现步骤

  1. 拖一个节点及报错

预期行为

撤销功能可以实现

平台

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

xflow-bot[bot] commented 2 years ago

👋 @ayaayaayaai

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

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

promise6512 commented 2 years ago

画布撤销功能,我在 dev 分支里面实现了,你可以拉这个分支看一下咋写的~

ayaayaayaai commented 2 years ago

已解决

azcdazq commented 2 years ago

请问怎么解决的

ws2332332 commented 1 year ago

首先,我没有在楼上所说的dev分支上看到解决的方案,也许是我自己没看到而已。我看过x6的文档,在graph实例里可以拿到history对象。因此我将history通过meta透传。这可能是比较笨的方法,目前我只能这么做。 image

xflow-bot[bot] commented 12 months ago

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.