diff --git a/demo/chains-of-thought/main.ts b/demo/chains-of-thought/main.ts index 3d2011e..3924965 100644 --- a/demo/chains-of-thought/main.ts +++ b/demo/chains-of-thought/main.ts @@ -33,6 +33,12 @@ class SpatialThought extends HTMLElement { handleEvent(event: PointerEvent): void { if (event.type === 'click' && event.target === this.#deleteButton) { this.#geometry.remove(); + document + .querySelectorAll( + `spatial-connection[source="spatial-geometry[id='${this.#geometry.id}']"], + spatial-connection[target="spatial-geometry[id='${this.#geometry.id}']"]` + ) + .forEach((el) => el.remove()); } } }