Fixing linked knot

This commit is contained in:
barsdeveloper
2022-11-14 20:46:27 +01:00
parent 92e4735d47
commit decef44d02
14 changed files with 142 additions and 68 deletions

View File

@@ -14,12 +14,13 @@ export default class KnotPinTemplate extends PinTemplate {
const rect = (
this.element.isInput()
// @ts-expect-error
? /** @type {KnotNodeTemplate} */ (this.element.nodeElement.template).outputPin.template.iconElement
: this.iconElement
).getBoundingClientRect()
? /** @type {KnotNodeTemplate} */ (this.element.nodeElement.template).outputPin.template
: this
)
.iconElement.getBoundingClientRect()
const location = Utility.convertLocation(
[
this.element.isInput() ? (rect.left + rect.right) / 2 : rect.right + 2,
this.element.isInput() ? rect.left + 1 : rect.right + 2,
(rect.top + rect.bottom) / 2,
],
this.element.blueprint.gridElement