KnotNode introduced

This commit is contained in:
barsdeveloper
2022-11-12 20:07:31 +01:00
parent 1579cd24e7
commit 5d3a614d78
7 changed files with 174 additions and 74 deletions

View File

@@ -46,6 +46,11 @@ export default class PinElement extends IElement {
}
static properties = {
pinType: {
type: String,
attribute: "data-type",
reflect: true,
},
advancedView: {
type: String,
attribute: "data-advanced-view",
@@ -75,11 +80,6 @@ export default class PinElement extends IElement {
attribute: "data-linked",
reflect: true,
},
pinType: {
type: String,
attribute: "data-type",
reflect: true,
},
pinDirection: {
type: String,
attribute: "data-direction",
@@ -108,13 +108,10 @@ export default class PinElement extends IElement {
/** @param {PinEntity<T>} entity */
constructor(entity) {
super(
entity,
new (PinElement.getTypeTemplate(entity))()
)
this.advancedView = entity.bAdvancedView
this.defaultValue = entity.getDefaultValue()
super(entity, new (PinElement.getTypeTemplate(entity))())
this.pinType = this.entity.getType()
this.advancedView = this.entity.bAdvancedView
this.defaultValue = this.entity.getDefaultValue()
this.color = PinElement.properties.color.converter.fromAttribute(Configuration.pinColor[this.pinType]?.toString())
this.isLinked = false
this.pinDirection = entity.isInput() ? "input" : entity.isOutput() ? "output" : "hidden"