This commit is contained in:
barsdeveloper
2021-10-10 14:14:05 +02:00
parent 8ef5f3dab4
commit 82355b9126
8 changed files with 121 additions and 121 deletions

24
js/GraphNode.js Normal file
View File

@@ -0,0 +1,24 @@
import SelectableDraggable from "./SelectableDraggable"
import NodeTemplate from "./template/NodeTemplate"
export default class GraphNode extends SelectableDraggable {
constructor() {
super(new NodeTemplate())
this.graphNodeName = 'N/A'
this.inputs = []
this.outputs = []
}
connectedCallback() {
super.connectedCallback()
this.classList.add('ueb-node')
if (this.selected) {
this.classList.add('ueb-selected')
}
this.style.setProperty('--ueb-position-x', this.location[0])
this.style.setProperty('--ueb-position-y', this.location[1])
}
}
customElements.define('u-object', GraphNode)