New node type

This commit is contained in:
barsdeveloper
2023-04-01 22:17:50 +02:00
parent a2bf17ab21
commit 82aaf5a9cb
11 changed files with 123 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
import { html, nothing } from "lit"
import Configuration from "../../Configuration.js"
import ElementFactory from "../../element/ElementFactory.js"
import MinimalPinTemplate from "../pin/MinimalPinTemplate.js"
import NodeTemplate from "./NodeTemplate.js"
@@ -21,6 +22,8 @@ export default class EventNodeTemplate extends NodeTemplate {
renderTop() {
const icon = this.renderNodeIcon()
const name = this.renderNodeName()
const customEvent = this.element.getType() === Configuration.nodeType.customEvent
&& (this.element.entity.CustomFunctionName || this.element.entity.FunctionReference.MemberParent)
return html`
<div class="ueb-node-name">
${icon ? html`
@@ -29,7 +32,7 @@ export default class EventNodeTemplate extends NodeTemplate {
${name ? html`
<div class="ueb-node-name-text ueb-ellipsis-nowrap-text">
${name}
${this.hasSubtitle && this.element.entity.FunctionReference.MemberParent ? html`
${customEvent ? html`
<div class="ueb-node-subtitle-text ueb-ellipsis-nowrap-text">
Custom Event
</div>