Additional pin templates type

This commit is contained in:
barsdeveloper
2022-03-27 13:42:52 +02:00
parent c5816f54d9
commit 846217861b
14 changed files with 159 additions and 57 deletions

View File

@@ -18,17 +18,38 @@ export default class PinTemplate extends ITemplate {
render(pin) {
if (pin.isInput()) {
return html`
<span class="ueb-pin-icon"></span>
${sanitizeText(pin.getPinDisplayName())}
<span class="ueb-pin-icon">
${this.renderIcon(pin)}
</span>
<span class="ueb-pin-content">
<span class="ueb-pin-name">${sanitizeText(pin.getPinDisplayName())}</span>
${this.renderInput(pin)}
</span>
`
} else {
return html`
${sanitizeText(pin.getPinDisplayName())}
<span class="ueb-pin-icon"></span>
<span class="ueb-pin-name">${sanitizeText(pin.getPinDisplayName())}</span>
<span class="ueb-pin-icon">
${this.renderIcon(pin)}
</span>
`
}
}
/**
* @param {PinElement} pin
*/
renderIcon(pin) {
return '<span class="ueb-pin-icon-value"></span>'
}
/**
* @param {PinElement} pin
*/
renderInput(pin) {
return ""
}
/**
* Applies the style to the element.
* @param {PinElement} pin element of the graph