diff --git a/resources/openbim-components.js b/resources/openbim-components.js index 17ae412ce..738ae76e2 100644 --- a/resources/openbim-components.js +++ b/resources/openbim-components.js @@ -104482,7 +104482,6 @@ class FragmentTree extends Component { this.onHovered = new Event(); this._title = "Model Tree"; this.uiElement = new UIElement(); - this.components.tools.add(FragmentTree.uuid, this); } get() { if (!this._tree) { @@ -104505,7 +104504,7 @@ class FragmentTree extends Component { if (this._tree) { await this._tree.dispose(); } - await this.onDisposed.trigger(FragmentTree.uuid); + await this.onDisposed.trigger(); this.onDisposed.reset(); } async update(groupSystems) { @@ -104563,8 +104562,6 @@ class FragmentTree extends Component { return groups; } } -FragmentTree.uuid = "5af6ebe1-26fc-4053-936a-801b6c7cb37e"; -ToolComponent.libraryUUIDs.add(FragmentTree.uuid); // TODO: Clean up // TODO: Improve UI element diff --git a/src/fragments/FragmentTree/index.ts b/src/fragments/FragmentTree/index.ts index 458379273..f12e8c24e 100644 --- a/src/fragments/FragmentTree/index.ts +++ b/src/fragments/FragmentTree/index.ts @@ -7,7 +7,7 @@ import { UIElement, } from "../../base-types"; import { FragmentTreeItem } from "./src/tree-item"; -import { Components, ToolComponent } from "../../core"; +import { Components } from "../../core"; import { FragmentClassifier } from "../FragmentClassifier"; import { Button, FloatingWindow } from "../../ui"; @@ -15,10 +15,8 @@ export class FragmentTree extends Component implements UI, Disposable { - static readonly uuid = "5af6ebe1-26fc-4053-936a-801b6c7cb37e" as const; - /** {@link Disposable.onDisposed} */ - readonly onDisposed = new Event(); + readonly onDisposed = new Event(); enabled: boolean = true; onSelected = new Event<{ items: FragmentIdMap; visible: boolean }>(); @@ -31,8 +29,6 @@ export class FragmentTree constructor(components: Components) { super(components); - - this.components.tools.add(FragmentTree.uuid, this); } get(): FragmentTreeItem { @@ -63,7 +59,7 @@ export class FragmentTree if (this._tree) { await this._tree.dispose(); } - await this.onDisposed.trigger(FragmentTree.uuid); + await this.onDisposed.trigger(); this.onDisposed.reset(); } @@ -136,5 +132,3 @@ export class FragmentTree return groups; } } - -ToolComponent.libraryUUIDs.add(FragmentTree.uuid);