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

undo redo 节点数据丢失问题 #4302

Open
wb-wenbei opened this issue May 14, 2024 · 3 comments
Open

undo redo 节点数据丢失问题 #4302

wb-wenbei opened this issue May 14, 2024 · 3 comments

Comments

@wb-wenbei
Copy link

wb-wenbei commented May 14, 2024

Describe the bug

在对节点进行undo/redo操作时,一旦undo将节点删除,再redo将节点还原,节点修改过的数据就会丢失。

Your Example Website or App

https://codesandbox.io/p/sandbox/reverent-flower-38qz45

Steps to Reproduce the Bug or Issue

1.打开页面,自动添加节点
2.点击change按钮,更改节点数据
3.点击get按钮,获取节点数据 20-20
4.点击undo按钮,撤销数据更改
5.点击undo按钮,撤销节点添加
6.点击redo按钮,还原节点添加
7.点击redo按钮,还原数据更改
8.点击get按钮,获取节点数据 10-10

Expected behavior

8点击get按钮,获取节点数据 20-20

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • @antv/x6 [2.18.1]
  • @antv/x6-plugin-history [2.2.4]

Additional context

No response

@cuidong626
Copy link
Contributor

image
打不开

@zlecheng
Copy link

你是不是每一个步骤都添加到历史记录里面去了,数据的操作你应该要从历史记录中剔除掉的

@wb-wenbei
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants