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

@@ -75,11 +75,13 @@ export default class NodeElement extends ISelectableDraggableElement {
#pins
/** @param {ObjectEntity} entity */
constructor(entity) {
super(entity, new (NodeElement.getTypeTemplate(entity))())
this.#pins = this.getPinEntities().filter(v => !v.isHidden()).map(v => new PinElement(v))
this.#pins.forEach(pin => pin.nodeElement = this)
/**
* @param {ObjectEntity} entity
* @param {NodeTemplate} template
*/
constructor(entity, template = undefined) {
super(entity, template ?? new (NodeElement.getTypeTemplate(entity))())
this.#pins = this.template.createPinElements()
this.nodeClass = this.entity.getClass()
this.name = this.entity.getObjectName()
this.advancedPinDisplay = this.entity.AdvancedPinDisplay?.toString()