Knot node switch pin

This commit is contained in:
barsdeveloper
2022-11-13 20:50:14 +01:00
parent 5d3a614d78
commit 92e4735d47
21 changed files with 315 additions and 121 deletions

View File

@@ -106,9 +106,12 @@ export default class PinElement extends IElement {
connections = 0
/** @param {PinEntity<T>} entity */
constructor(entity) {
super(entity, new (PinElement.getTypeTemplate(entity))())
/**
* @param {PinEntity<T>} entity
* @param {PinTemplate} template
*/
constructor(entity, template = undefined) {
super(entity, template ?? new (PinElement.getTypeTemplate(entity))())
this.pinType = this.entity.getType()
this.advancedView = this.entity.bAdvancedView
this.defaultValue = this.entity.getDefaultValue()