Target subtitle added

This commit is contained in:
barsdeveloper
2022-11-19 19:14:25 +01:00
parent b55779312b
commit 1353a4ff4f
10 changed files with 101 additions and 61 deletions

View File

@@ -11,6 +11,7 @@ import SimpleSerializationRotatorEntity from "./SimpleSerializationRotatorEntity
import SimpleSerializationVectorEntity from "./SimpleSerializationVectorEntity"
import TypeInitialization from "./TypeInitialization"
import UnionType from "./UnionType"
import Utility from "../Utility"
import VectorEntity from "./VectorEntity"
/** @typedef {import("./TypeInitialization").AnyValue} AnyValue */
@@ -124,6 +125,18 @@ export default class PinEntity extends IEntity {
return this.PinType.PinCategory
}
getDisplayName() {
let matchResult = null
if (
this.PinToolTip
// Match up until the first \n excluded or last character
&& (matchResult = this.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))
) {
return Utility.formatStringName(matchResult[1])
}
return Utility.formatStringName(this.PinName)
}
/** @param {PinEntity} other */
copyTypeFrom(other) {
this.PinType.PinCategory = other.PinType.PinCategory