mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 19:47:32 +08:00
Add pin (#6)
* Add pin and minor style fix WIP * Fix default pin graphics * Fix sorting * Min, max nodes are variadic
This commit is contained in:
@@ -16,6 +16,6 @@ export default class ExecPinTemplate extends PinTemplate {
|
||||
} else if (pinName === "execute" || pinName === "then") {
|
||||
return html``
|
||||
}
|
||||
return html`${this.element.getPinDisplayName()}`
|
||||
return html`<span class="ueb-pin-name ueb-ellipsis-nowrap-text">${this.element.getPinDisplayName()}</span>`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export default class KnotPinTemplate extends MinimalPinTemplate {
|
||||
: this
|
||||
)
|
||||
.iconElement.getBoundingClientRect()
|
||||
const boundingLocation = [this.element.isInput() ? rect.left : rect.right, (rect.top + rect.bottom) / 2]
|
||||
const boundingLocation = [this.element.isInput() ? rect.left : rect.right + 1, (rect.top + rect.bottom) / 2]
|
||||
const location = Utility.convertLocation(boundingLocation, this.blueprint.template.gridElement)
|
||||
return this.blueprint.compensateTranslation(location[0], location[1])
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ export default class PinTemplate extends ITemplate {
|
||||
|
||||
renderName() {
|
||||
return html`
|
||||
<span class="ueb-pin-name">${this.element.getPinDisplayName()}</span>
|
||||
<span class="ueb-pin-name ueb-ellipsis-nowrap-text">${this.element.getPinDisplayName()}</span>
|
||||
`
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export default class PinTemplate extends ITemplate {
|
||||
|
||||
getLinkLocation() {
|
||||
const rect = this.iconElement.getBoundingClientRect()
|
||||
const boundingLocation = [this.element.isInput() ? rect.left : rect.right, (rect.top + rect.bottom) / 2]
|
||||
const boundingLocation = [this.element.isInput() ? rect.left : rect.right + 1, (rect.top + rect.bottom) / 2]
|
||||
const location = Utility.convertLocation(boundingLocation, this.blueprint.template.gridElement)
|
||||
return this.blueprint.compensateTranslation(location[0], location[1])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user