mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-28 03:24:43 +08:00
Get rid of the Observable class
This commit is contained in:
@@ -161,8 +161,6 @@ export default class NodeElement extends ISelectableDraggableElement {
|
||||
this.pureFunction = this.entity.bIsPureFunc
|
||||
this.dragLinkObjects = []
|
||||
super.setLocation([this.entity.NodePosX.value, this.entity.NodePosY.value])
|
||||
this.entity.subscribe("AdvancedPinDisplay", value => this.advancedPinDisplay = value)
|
||||
this.entity.subscribe("Name", value => this.nodeName = value)
|
||||
if (this.entity.NodeWidth && this.entity.NodeHeight) {
|
||||
this.sizeX = this.entity.NodeWidth.value
|
||||
this.sizeY = this.entity.NodeHeight.value
|
||||
@@ -308,6 +306,7 @@ export default class NodeElement extends ISelectableDraggableElement {
|
||||
}
|
||||
}
|
||||
this.entity.Name = name
|
||||
this.nodeName = this.entity.Name
|
||||
}
|
||||
|
||||
getPinElements() {
|
||||
@@ -338,6 +337,7 @@ export default class NodeElement extends ISelectableDraggableElement {
|
||||
|
||||
setShowAdvancedPinDisplay(value) {
|
||||
this.entity.AdvancedPinDisplay = new IdentifierEntity(value ? "Shown" : "Hidden")
|
||||
this.advancedPinDisplay = this.entity.AdvancedPinDisplay
|
||||
}
|
||||
|
||||
toggleShowAdvancedPinDisplay() {
|
||||
|
||||
@@ -145,15 +145,6 @@ export default class PinElement extends IElement {
|
||||
this.isLinked = false
|
||||
this.pinDirection = entity.isInput() ? "input" : entity.isOutput() ? "output" : "hidden"
|
||||
this.nodeElement = /** @type {NodeElement} */(nodeElement)
|
||||
|
||||
// this.entity.subscribe("DefaultValue", value => this.defaultValue = value.toString())
|
||||
this.entity.subscribe("PinToolTip", value => {
|
||||
let matchResult = value.match(/\s*(.+?(?=\n)|.+\S)\s*/)
|
||||
if (matchResult) {
|
||||
return Utility.formatStringName(matchResult[1])
|
||||
}
|
||||
return Utility.formatStringName(this.entity.PinName)
|
||||
})
|
||||
}
|
||||
|
||||
setup() {
|
||||
|
||||
Reference in New Issue
Block a user