mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-22 06:13:23 +08:00
Pins name fixed and tested
This commit is contained in:
@@ -337,10 +337,10 @@ export default class Utility {
|
||||
.replace(/^\s*b/, "")
|
||||
// Insert a space where needed, possibly removing unnecessary elading characters
|
||||
.replaceAll(Configuration.nameRegexSpaceReplacement, " ")
|
||||
.trim()
|
||||
.split(" ")
|
||||
.map(v => Utility.capitalFirstLetter(v))
|
||||
.join(" ")
|
||||
.trim()
|
||||
}
|
||||
|
||||
/** @param {String} value */
|
||||
|
||||
@@ -211,15 +211,15 @@ export default class PinEntity extends IEntity {
|
||||
|
||||
getDisplayName() {
|
||||
let matchResult = null
|
||||
if (this.PinFriendlyName) {
|
||||
return Utility.formatStringName(this.PinFriendlyName.toString())
|
||||
}
|
||||
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 matchResult[1]
|
||||
}
|
||||
if (this.PinFriendlyName) {
|
||||
return Utility.formatStringName(this.PinFriendlyName.toString())
|
||||
}
|
||||
return Utility.formatStringName(this.PinName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user