Link path fixed

This commit is contained in:
barsdeveloper
2022-02-13 00:54:02 +01:00
parent 785f9d1846
commit 7cf556d89d
8 changed files with 62 additions and 41 deletions

View File

@@ -24,7 +24,7 @@ export default class GraphLink extends GraphElement {
this.template
/** @type {SVGPathElement} */
this.pathElement = null
this.originatesFromOutput = false
this.originatesFromInput = false
this.sourceLocation = [0, 0]
this.destinationLocation = [0, 0]
this.setSourcePin(source)
@@ -59,7 +59,7 @@ export default class GraphLink extends GraphElement {
this.#source?.removeEventListener("ueb-node-delete", this.#nodeDeleteHandler)
this.#source?.removeEventListener("ueb-node-drag", this.#nodeDragSourceHandler)
this.#source = graphPin
this.originatesFromOutput = graphPin.isInput()
this.originatesFromInput = graphPin.isInput()
this.#source?.addEventListener("ueb-node-delete", this.#nodeDeleteHandler)
this.#source?.addEventListener("ueb-node-drag", this.#nodeDragSourceHandler)
this.setSourceLocation()