Move entities decode methods to entities

This commit is contained in:
barsdeveloper
2023-01-28 23:33:08 +01:00
parent daf6abf038
commit 2ccb0dc519
15 changed files with 538 additions and 520 deletions

View File

@@ -225,7 +225,7 @@ export default class NodeElement extends ISelectableDraggableElement {
}
getNodeDisplayName() {
return Configuration.nodeDisplayName(this)
return this.entity.nodeDisplayName()
}
/** @param {Number} value */
@@ -279,10 +279,6 @@ export default class NodeElement extends ISelectableDraggableElement {
super.setLocation(x, y, acknowledge)
}
isEvent() {
return this.template instanceof EventNodeTemplate
}
acknowledgeReflow() {
this.requestUpdate()
this.updateComplete.then(() => this.computeSizes())

View File

@@ -1,5 +1,4 @@
import BoolPinTemplate from "../template/pin/BoolPinTemplate"
import Configuration from "../Configuration"
import ElementFactory from "./ElementFactory"
import ExecPinTemplate from "../template/pin/ExecPinTemplate"
import GuidEntity from "../entity/GuidEntity"
@@ -175,7 +174,7 @@ export default class PinElement extends IElement {
/** @return {CSSResult} */
getColor() {
return Configuration.pinColor(this)
return this.entity.pinColor()
}
isInput() {