remove broken connections
This commit is contained in:
parent
dc1b389428
commit
c0dd007495
|
|
@ -33,6 +33,12 @@ class SpatialThought extends HTMLElement {
|
||||||
handleEvent(event: PointerEvent): void {
|
handleEvent(event: PointerEvent): void {
|
||||||
if (event.type === 'click' && event.target === this.#deleteButton) {
|
if (event.type === 'click' && event.target === this.#deleteButton) {
|
||||||
this.#geometry.remove();
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue