documentatie

This commit is contained in:
2026-09-03 17:24:56 +02:00
parent e971dfe942
commit 42fcea9af8
14 changed files with 135 additions and 16 deletions
+6
View File
@@ -12,6 +12,11 @@ export class CmapEditorHost {
this.editor = null;
}
/**
* goal : Replace any active editor with a newly configured editor instance.
* post : The previous editor is destroyed; an optional model is loaded before onCreated runs.
* result : The active editor, or null when no factory is configured.
*/
create(options = null, model = null) {
this.destroy();
if (!this.factory) return null;
@@ -23,6 +28,7 @@ export class CmapEditorHost {
return this.editor;
}
/** Destroy the active editor once and release the host's reference to it. */
destroy() {
if (!this.editor) return;
this.editor.destroy();