Make struct node

This commit is contained in:
barsdeveloper
2023-08-11 19:44:53 +02:00
parent 5bda087b81
commit 11f819e6d9
7 changed files with 79 additions and 19 deletions

View File

@@ -1,4 +1,5 @@
import { html, nothing } from "lit"
import Configuration from "../../Configuration.js"
import ITemplate from "../ITemplate.js"
import MouseCreateLink from "../../input/mouse/MouseCreateLink.js"
import SVGIcon from "../../SVGIcon.js"
@@ -100,8 +101,17 @@ export default class PinTemplate extends ITemplate {
}
renderName() {
let name = this.element.getPinDisplayName()
const nodeElement = this.element.nodeElement
const pinName = this.element.getPinName()
if (
nodeElement.getType() == Configuration.paths.makeStruct
&& pinName == nodeElement.entity.StructType.getName()
) {
name = pinName
}
return html`
<span class="ueb-pin-name ueb-ellipsis-nowrap-text">${this.element.getPinDisplayName()}</span>
<span class="ueb-pin-name ueb-ellipsis-nowrap-text">${name}</span>
`
}