mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-17 19:03:27 +08:00
Naming
This commit is contained in:
24
js/GraphNode.js
Normal file
24
js/GraphNode.js
Normal 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)
|
||||
Reference in New Issue
Block a user