[Feat]: history插件可以设置哪些节点的变化不被记录
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the feature / 功能描述
## 背景
最近在用G6做SLAM路网绘制的功能,其中涉及到激光点实时展示与站点、路径的绘制,绘制站点与路径时需要支持回撤功能
## 问题
当绘制站点与路径时,激光点也在实时绘制。此时调用撤销功能会失效,关闭激光点等实时渲染的数据后再次操作,可以正常回撤
## 原因分析
用户的每一次操作中间历史栈都被插入了激光点更新的操作,导致回撤时无法回撤到用户的操作
## 目前解决方案
通过自定义插件调用this.context.element?.draw({ slice: true, animation: false })?.finished取更新激光点数据,从而避免触发历史插件的记录功能
## 需求
希望能够提供字段去过滤掉这些实时节点的更新操作
### Are you willing to contribute? / 是否愿意参与贡献?
✅ Yes / 是
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the history plugin and the update path involved in this.context.element?.draw({ slice: true, animation: false })?.finished. The change is complete when real-time node updates can be excluded from history while user operations such as drawing stations and paths still support undo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100