Link morphing WIP

This commit is contained in:
barsdeveloper
2022-02-10 23:42:24 +01:00
parent c33e36ffe1
commit 785f9d1846
8 changed files with 94 additions and 55 deletions

View File

@@ -24,7 +24,7 @@ export default class GraphLink extends GraphElement {
this.template
/** @type {SVGPathElement} */
this.pathElement = null
this.originatesFromInput = false
this.originatesFromOutput = 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.originatesFromInput = graphPin.isInput()
this.originatesFromOutput = graphPin.isInput()
this.#source?.addEventListener("ueb-node-delete", this.#nodeDeleteHandler)
this.#source?.addEventListener("ueb-node-drag", this.#nodeDragSourceHandler)
this.setSourceLocation()