mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Some fixes and new nodes names added
This commit is contained in:
@@ -56,7 +56,7 @@ export default class IInputPinTemplate extends PinTemplate {
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
const Self = /** @type {typeof IInputPinTemplate} */(this.constructor)
|
||||
if (Self.canWrapInput) {
|
||||
if (Self.canWrapInput && this.isInputRendered()) {
|
||||
this.element.addEventListener("input", this.#checkWrapHandler)
|
||||
this.nameWidth = this.blueprint.scaleCorrect(
|
||||
this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width ?? 0
|
||||
@@ -74,7 +74,7 @@ export default class IInputPinTemplate extends PinTemplate {
|
||||
} else {
|
||||
this.element.addEventListener("focusout", this.#setInput)
|
||||
}
|
||||
if (Self.canWrapInput) {
|
||||
if (Self.canWrapInput && this.isInputRendered()) {
|
||||
this.element.addEventListener("input", this.#checkWrapHandler)
|
||||
this.element.nodeElement.addEventListener(Configuration.nodeReflowEventName, this.#checkWrapHandler)
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export default class PinTemplate extends ITemplate {
|
||||
const content = html`
|
||||
<div class="ueb-pin-content">
|
||||
${this.isNameRendered ? this.renderName() : nothing}
|
||||
${this.element.isInput() && !this.element.entity.bDefaultValueIsIgnored ? this.renderInput() : html``}
|
||||
${this.isInputRendered() ? this.renderInput() : html``}
|
||||
</div>
|
||||
`
|
||||
return html`
|
||||
@@ -105,6 +105,12 @@ export default class PinTemplate extends ITemplate {
|
||||
`
|
||||
}
|
||||
|
||||
isInputRendered() {
|
||||
return this.element.isInput()
|
||||
&& !this.element.entity.bDefaultValueIsIgnored
|
||||
&& !this.element.entity.PinType.bIsReference
|
||||
}
|
||||
|
||||
renderInput() {
|
||||
return html``
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user