mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-20 05:24:52 +08:00
Some minor fixes and refactoring
This commit is contained in:
@@ -98,8 +98,8 @@ export default class PinElement extends IElement {
|
||||
this.pinId = this.entity.PinId
|
||||
this.pinType = this.entity.getType()
|
||||
this.defaultValue = this.entity.getDefaultValue()
|
||||
this.color = PinElement.properties.color.converter.fromAttribute(this.getColor().toString())
|
||||
this.pinDirection = entity.isInput() ? "input" : entity.isOutput() ? "output" : "hidden"
|
||||
this.updateColor()
|
||||
}
|
||||
|
||||
setup() {
|
||||
@@ -107,6 +107,10 @@ export default class PinElement extends IElement {
|
||||
this.nodeElement = this.closest("ueb-node")
|
||||
}
|
||||
|
||||
updateColor() {
|
||||
this.color = PinElement.properties.color.converter.fromAttribute(this.entity.pinColor().toString())
|
||||
}
|
||||
|
||||
createPinReference() {
|
||||
return new PinReferenceEntity(new SymbolEntity(this.nodeElement.getNodeName()), this.getPinId())
|
||||
}
|
||||
@@ -123,11 +127,6 @@ export default class PinElement extends IElement {
|
||||
return this.entity.pinTitle()
|
||||
}
|
||||
|
||||
/** @return {CSSResult} */
|
||||
getColor() {
|
||||
return this.entity.pinColor()
|
||||
}
|
||||
|
||||
/** @param {PinElement} pin */
|
||||
#traverseKnots(pin) {
|
||||
while (pin?.isKnot()) {
|
||||
@@ -271,8 +270,8 @@ export default class PinElement extends IElement {
|
||||
}
|
||||
|
||||
unlinkFromAll() {
|
||||
const isLinked = this.getLinks().length
|
||||
this.getLinks().map(ref => this.blueprint.getPin(ref)).forEach(pin => this.unlinkFrom(pin))
|
||||
const isLinked = false
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user