mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-23 15:24:45 +08:00
WIP
This commit is contained in:
@@ -55,6 +55,7 @@ export default class BlueprintTemplate extends ITemplate {
|
||||
/** @type {HTMLElement} */ linksContainerElement
|
||||
/** @type {HTMLElement} */ nodesContainerElement
|
||||
viewportSize = [0, 0]
|
||||
#removeZoomChanged = () => this.headerElement.classList.remove("ueb-zoom-changed")
|
||||
|
||||
/** @param {Blueprint} element */
|
||||
initialize(element) {
|
||||
@@ -176,11 +177,12 @@ export default class BlueprintTemplate extends ITemplate {
|
||||
willUpdate(changedProperties) {
|
||||
super.willUpdate(changedProperties)
|
||||
if (this.headerElement && changedProperties.has("zoom")) {
|
||||
if (this.headerElement.classList.contains("ueb-zoom-changed")) {
|
||||
this.headerElement.classList.remove("ueb-zoom-changed")
|
||||
void this.headerElement.offsetWidth // To trigger the reflow
|
||||
}
|
||||
this.headerElement.classList.add("ueb-zoom-changed")
|
||||
this.headerElement.addEventListener(
|
||||
"animationend",
|
||||
() => this.headerElement.classList.remove("ueb-zoom-changed")
|
||||
)
|
||||
this.headerElement.addEventListener("animationend", this.#removeZoomChanged, { once: true })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ export default class EnumPinTemplate extends IInputPinTemplate {
|
||||
: [k, Utility.formatStringName(k)]
|
||||
)
|
||||
?? []
|
||||
const defaultEntry = this.element.getDefaultValue().toString()
|
||||
const defaultEntry = this.element.getDefaultValue()?.toString()
|
||||
if (!this.#dropdownEntries.find(([k, v]) => k === defaultEntry)) {
|
||||
this.#dropdownEntries.push([defaultEntry, Utility.formatStringName(defaultEntry)])
|
||||
}
|
||||
|
||||
@@ -143,9 +143,7 @@ export default class PinTemplate extends ITemplate {
|
||||
}
|
||||
|
||||
isInputRendered() {
|
||||
return this.element.isInput()
|
||||
&& !this.element.entity.bDefaultValueIsIgnored?.valueOf()
|
||||
&& !this.element.entity.PinType.bIsReference?.valueOf()
|
||||
return this.element.isInput() && !this.element.entity.PinType.bIsReference?.valueOf()
|
||||
}
|
||||
|
||||
renderInput() {
|
||||
|
||||
Reference in New Issue
Block a user