Fix scrolling scale, other knot style fixes

This commit is contained in:
barsdeveloper
2023-01-21 15:51:47 +01:00
parent efe560adda
commit a17bbeb2de
15 changed files with 238 additions and 84 deletions

View File

@@ -102,13 +102,23 @@ export default class NodeTemplate extends ISelectableDraggableTemplate {
const inputContainer = /** @type {HTMLElement} */(this.element.querySelector(".ueb-node-inputs"))
const outputContainer = /** @type {HTMLElement} */(this.element.querySelector(".ueb-node-outputs"))
this.element.nodeNameElement = /** @type {HTMLElement} */(this.element.querySelector(".ueb-node-name-text"))
let hasInput = false
let hasOutput = false
this.element.getPinElements().forEach(p => {
if (p.isInput()) {
inputContainer.appendChild(p)
hasInput = true
} else if (p.isOutput()) {
outputContainer.appendChild(p)
hasOutput = true
}
})
if (hasInput) {
this.element.classList.add("ueb-node-has-inputs")
}
if (hasOutput) {
this.element.classList.add("ueb-node-has-outputs")
}
}
createPinElements() {