Some fixes and new nodes names added

This commit is contained in:
barsdeveloper
2023-05-22 22:15:08 +02:00
parent fa35c4860c
commit 5dfa8aff1b
12 changed files with 56 additions and 20 deletions

View File

@@ -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)
}