Simplify arc calculation

This commit is contained in:
barsdeveloper
2025-01-23 23:33:54 +02:00
parent 6403fec906
commit c356878e3f
14 changed files with 444 additions and 183 deletions

View File

@@ -182,4 +182,16 @@ export default class PinTemplate extends ITemplate {
getClickableElement() {
return this.#wrapperElement ?? this.element
}
/** All the link connected to this pin */
getAllConnectedLinks() {
if (!this.element.isLinked) {
return []
}
const nodeTitle = this.element.nodeElement.nodeTitle
const pinId = this.element.pinId
const query = `ueb-link[data-origin-node="${nodeTitle}"][data-origin-pin="${pinId}"],`
+ `ueb-link[data-target-node="${nodeTitle}"][data-target-pin="${pinId}"]`
return /** @type {LinkElement[]} */([...this.blueprint.querySelectorAll(query)])
}
}