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
removeDocument(doc: IDocumentModel) { const index = this.documents.indexOf(doc); if (index < 0) { return; } this.documents.splice(index, 1); this.documentsMap.delete(doc.id); }
removeDocument 只是简单地把document从内部数组里删除。但document上挂载的事件(onChangeNodeProp)如还是要自己处理。
这会提高开发者的心智负担,document不能随便remove,甚至要对project/document再包裹一层来管理对象的生命周期。
建议引擎完善dispose方法,不要再依赖刷新页面解决🙏🏻
相关: #2181 (引擎目前提供的api,不足以在onRemoveDocument阶段清理事件)
The text was updated successfully, but these errors were encountered:
liujuping
No branches or pull requests
removeDocument 只是简单地把document从内部数组里删除。但document上挂载的事件(onChangeNodeProp)如还是要自己处理。
这会提高开发者的心智负担,document不能随便remove,甚至要对project/document再包裹一层来管理对象的生命周期。
建议引擎完善dispose方法,不要再依赖刷新页面解决🙏🏻
相关:
#2181 (引擎目前提供的api,不足以在onRemoveDocument阶段清理事件)
The text was updated successfully, but these errors were encountered: