Fix style to match unreal sizes

This commit is contained in:
barsdeveloper
2023-05-21 19:10:03 +02:00
parent f17b5ee15a
commit a3422ba8b6
14 changed files with 106 additions and 30 deletions

View File

@@ -55,7 +55,8 @@ export default class IInputPinTemplate extends PinTemplate {
/** @param {PropertyValues} changedProperties */
firstUpdated(changedProperties) {
super.firstUpdated(changedProperties)
if (/** @type {typeof IInputPinTemplate} */(this.constructor).canWrapInput) {
const Self = /** @type {typeof IInputPinTemplate} */(this.constructor)
if (Self.canWrapInput) {
this.element.addEventListener("input", this.#checkWrapHandler)
this.nameWidth = this.blueprint.scaleCorrect(
this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width ?? 0
@@ -73,7 +74,7 @@ export default class IInputPinTemplate extends PinTemplate {
} else {
this.element.addEventListener("focusout", this.#setInput)
}
if (/** @type {typeof IInputPinTemplate} */(this.constructor).canWrapInput) {
if (Self.canWrapInput) {
this.element.addEventListener("input", this.#checkWrapHandler)
this.element.nodeElement.addEventListener(Configuration.nodeReflowEventName, this.#checkWrapHandler)
}