We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
移动连线到空白处,松开鼠标,该连线还原后,无法重做了(连线被还原后,感觉整个历史队列被清空了,而且history.on('change')没有监听到这一变化)
history.on('change')
https://codesandbox.io/s/lian-xian-yi-dong-hou-wu-fa-chong-zuo-wen-ti-wq8vj4?file=/src/app.tsx
连线移动无效被还原后,不要影响之前的历史队列
No response
The text was updated successfully, but these errors were encountered:
其实所有会导致元素属性变更的操作都会导致 redo 队列被清空,只不过连线校验失败重新还原到原来的连接桩,在在用户看来是一个无效的操作,不应该记录到历史记录中,同时不应该导致 redo 队列清空。这个问题暂时还没有好的方案来解决。
Sorry, something went wrong.
这个场景还是推荐再监听一下 batch 时间,以获取最新的 undo 和 redo 状态。
batch
undo
redo
graph.history.on("batch", (args) => { this.setState({ canUndo: this.graph.history.canUndo(), canRedo: this.graph.history.canRedo() }); });
No branches or pull requests
Describe the bug
移动连线到空白处,松开鼠标,该连线还原后,无法重做了(连线被还原后,感觉整个历史队列被清空了,而且
history.on('change')
没有监听到这一变化)Your Example Website or App
https://codesandbox.io/s/lian-xian-yi-dong-hou-wu-fa-chong-zuo-wen-ti-wq8vj4?file=/src/app.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
连线移动无效被还原后,不要影响之前的历史队列
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: