()
| 272 | } |
| 273 | |
| 274 | export async function destroy() { |
| 275 | // remove all documents |
| 276 | const { documents } = project; |
| 277 | if (Array.isArray(documents) && documents.length > 0) { |
| 278 | documents.forEach(((doc: IPublicModelDocumentModel) => project.removeDocument(doc))); |
| 279 | } |
| 280 | |
| 281 | // TODO: delete plugins except for core plugins |
| 282 | |
| 283 | // unmount DOM container, this will trigger React componentWillUnmount lifeCycle, |
| 284 | // so necessary cleanups will be done. |
| 285 | engineContainer && unmountComponentAtNode(engineContainer); |
| 286 | } |
no test coverage detected
searching dependent graphs…