mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-18 20:34:54 +08:00
Refactoring WIP
This commit is contained in:
@@ -14,7 +14,7 @@ export default class KnotNodeTemplate extends NodeTemplate {
|
||||
return
|
||||
}
|
||||
this.#switchDirectionsVisually = value
|
||||
this.element.acknowledgeReflow()
|
||||
this.element.acknowledgeUpdate()
|
||||
}
|
||||
|
||||
/** @type {PinElement} */
|
||||
@@ -35,17 +35,6 @@ export default class KnotNodeTemplate extends NodeTemplate {
|
||||
this.element.classList.add("ueb-node-style-minimal")
|
||||
}
|
||||
|
||||
/** @param {PropertyValues} changedProperties */
|
||||
update(changedProperties) {
|
||||
super.update(changedProperties)
|
||||
if (!this.#inputPin.isLinked && !this.#outputPin.isLinked) {
|
||||
this.#inputPin.entity.PinType.PinCategory.value = "wildcard"
|
||||
this.#inputPin.updateColor()
|
||||
this.#outputPin.entity.PinType.PinCategory.value = "wildcard"
|
||||
this.#inputPin.updateColor()
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="ueb-node-border"></div>
|
||||
|
||||
@@ -31,14 +31,14 @@ export default class NodeTemplate extends ISelectableDraggableTemplate {
|
||||
} else {
|
||||
(pin.isInput() ? this.inputContainer : this.outputContainer).appendChild(this.createPinElement(pin))
|
||||
}
|
||||
this.element.acknowledgeReflow()
|
||||
this.element.acknowledgeUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
toggleAdvancedDisplayHandler = () => {
|
||||
this.element.toggleShowAdvancedPinDisplay()
|
||||
this.element.requestUpdate()
|
||||
this.element.updateComplete.then(() => this.element.acknowledgeReflow())
|
||||
this.element.updateComplete.then(() => this.element.acknowledgeUpdate())
|
||||
}
|
||||
|
||||
/** @param {PinEntity<IEntity>} pinEntity */
|
||||
@@ -125,7 +125,7 @@ export default class NodeTemplate extends ISelectableDraggableTemplate {
|
||||
this.inputContainer = this.element.querySelector(".ueb-node-inputs")
|
||||
this.outputContainer = this.element.querySelector(".ueb-node-outputs")
|
||||
this.setupPins()
|
||||
this.element.updateComplete.then(() => this.element.acknowledgeReflow())
|
||||
this.element.updateComplete.then(() => this.element.acknowledgeUpdate())
|
||||
}
|
||||
|
||||
setupPins() {
|
||||
|
||||
Reference in New Issue
Block a user