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

希望初始化渲染时addHistory改成可配置 #1012

Open
chenjiangsong opened this issue Nov 20, 2024 · 2 comments
Open

希望初始化渲染时addHistory改成可配置 #1012

chenjiangsong opened this issue Nov 20, 2024 · 2 comments

Comments

@chenjiangsong
Copy link

// 初始渲染
this.render(this.opt.fit ? () => this.view.fit() : () => {})
setTimeout(() => {
  this.command.addHistory()
}, 0)

addHistory会触发一次 data_change,对保存和协作逻辑有影响

@chenjiangsong
Copy link
Author

同理,需要一个api重绘思维导图,同时不触发data_change。否则在socket协作时会无限触发

@ZhangMingZhao1
Copy link
Contributor

// 初始渲染
this.render(this.opt.fit ? () => this.view.fit() : () => {})
setTimeout(() => {
  this.command.addHistory()
}, 0)

addHistory会触发一次 data_change,对保存和协作逻辑有影响

这里还有个问题,如果是以readonly初始化的,实际上history数组没有初始化成功
image

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

2 participants