Various fixes

This commit is contained in:
barsdeveloper
2021-10-27 19:27:19 +02:00
parent 56c23fc192
commit 418630255e
41 changed files with 2401 additions and 2337 deletions

50
js/graph/GraphNode.js Normal file → Executable file
View File

@@ -1,25 +1,25 @@
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() {
const type = this.getAttribute('type')?.trim()
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-node', GraphNode)
import NodeTemplate from "../template/NodeTemplate"
import SelectableDraggable from "./SelectableDraggable"
export default class GraphNode extends SelectableDraggable {
constructor() {
super(new NodeTemplate())
this.graphNodeName = 'n/a'
this.inputs = []
this.outputs = []
}
connectedCallback() {
const type = this.getAttribute('type')?.trim()
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-node', GraphNode)